/external/compiler-rt/lib/asan/ |
D | asan_interface_internal.h | 25 using __sanitizer::uptr; 48 uptr beg; // The address of the global. 49 uptr size; // The original size of the global. 50 uptr size_with_redzone; // The size with the redzone. 54 uptr has_dynamic_init; // Non-zero if the global has dynamic initializer. 57 uptr odr_indicator; // The address of the ODR indicator symbol. 64 void __asan_register_image_globals(uptr *flag); 66 void __asan_unregister_image_globals(uptr *flag); 71 void __asan_register_globals(__asan_global *globals, uptr n); 73 void __asan_unregister_globals(__asan_global *globals, uptr n); [all …]
|
D | asan_fake_stack.h | 24 uptr magic; // Modified by the instrumented code. 25 uptr descr; // Modified by the instrumented code. 26 uptr pc; // Modified by the instrumented code. 27 uptr real_stack; 58 static const uptr kMinStackFrameSizeLog = 6; // Min frame is 64B. 59 static const uptr kMaxStackFrameSizeLog = 16; // Max stack frame is 64K. 62 static const uptr kNumberOfSizeClasses = 66 static FakeStack *Create(uptr stack_size_log); 71 static uptr SizeRequiredForFlags(uptr stack_size_log) { in SizeRequiredForFlags() 72 return ((uptr)1) << (stack_size_log + 1 - kMinStackFrameSizeLog); in SizeRequiredForFlags() [all …]
|
D | asan_report.h | 22 uptr beg; 23 uptr size; 25 uptr name_len; 30 uptr name_size; 31 uptr region_address; 32 uptr region_size; 38 int GetGlobalsForAddress(uptr addr, __asan_global *globals, u32 *reg_sites, 40 bool GetInfoForAddressIfGlobal(uptr addr, AddressDescription *descr); 43 void DescribeHeapAddress(uptr addr, uptr access_size); 44 bool DescribeAddressIfShadow(uptr addr, AddressDescription *descr = nullptr, [all …]
|
D | asan_fake_stack.cc | 30 ALWAYS_INLINE void SetShadow(uptr ptr, uptr size, uptr class_id, u64 magic) { in SetShadow() 34 for (uptr i = 0; i < (((uptr)1) << class_id); i++) { in SetShadow() 45 FakeStack *FakeStack::Create(uptr stack_size_log) { in Create() 46 static uptr kMinStackSizeLog = 16; in Create() 47 static uptr kMaxStackSizeLog = FIRST_32_SECOND_64(24, 28); in Create() 52 uptr size = RequiredSize(stack_size_log); in Create() 70 for (uptr class_id = 0; class_id < kNumberOfSizeClasses; class_id++) in Destroy() 75 uptr size = RequiredSize(stack_size_log_); in Destroy() 76 FlushUnneededASanShadowMemory(reinterpret_cast<uptr>(this), size); in Destroy() 81 PoisonShadow(reinterpret_cast<uptr>(this), RequiredSize(stack_size_log()), in PoisonAll() [all …]
|
D | asan_poisoning.cc | 34 void PoisonShadow(uptr addr, uptr size, u8 value) { in PoisonShadow() 44 void PoisonShadowPartialRightRedzone(uptr addr, in PoisonShadowPartialRightRedzone() 45 uptr size, in PoisonShadowPartialRightRedzone() 46 uptr redzone_size, in PoisonShadowPartialRightRedzone() 59 explicit ShadowSegmentEndpoint(uptr address) { in ShadowSegmentEndpoint() 66 void FlushUnneededASanShadowMemory(uptr p, uptr size) { in FlushUnneededASanShadowMemory() 69 uptr page_size = GetPageSizeCached(); in FlushUnneededASanShadowMemory() 70 uptr shadow_beg = RoundUpTo(MemToShadow(p), page_size); in FlushUnneededASanShadowMemory() 71 uptr shadow_end = RoundDownTo(MemToShadow(p + size), page_size); in FlushUnneededASanShadowMemory() 75 void AsanPoisonOrUnpoisonIntraObjectRedzone(uptr ptr, uptr size, bool poison) { in AsanPoisonOrUnpoisonIntraObjectRedzone() [all …]
|
D | asan_allocator.h | 55 uptr Beg(); // First byte of user memory. 56 uptr End(); // Last byte of user memory. 57 uptr UsedSize(); // Size requested by the user. 58 uptr AllocTid(); 59 uptr FreeTid(); 65 bool AddrIsInside(uptr addr, uptr access_size, sptr *offset) { in AddrIsInside() 72 bool AddrIsAtLeft(uptr addr, uptr access_size, sptr *offset) { in AddrIsAtLeft() 80 bool AddrIsAtRight(uptr addr, uptr access_size, sptr *offset) { in AddrIsAtRight() 92 AsanChunkView FindHeapChunkByAddress(uptr address); 102 uptr size() { return size_; } in size() [all …]
|
D | asan_malloc_linux.cc | 29 static uptr allocated_for_dlsym; 30 static const uptr kDlsymAllocPoolSize = 1024; 31 static uptr alloc_memory_for_dlsym[kDlsymAllocPoolSize]; 34 uptr off = (uptr)ptr - (uptr)alloc_memory_for_dlsym; in IsInDlsymAllocPool() 38 static void *AllocateFromLocalPool(uptr size_in_bytes) { in AllocateFromLocalPool() 39 uptr size_in_words = RoundUpTo(size_in_bytes, kWordSize) / kWordSize; in AllocateFromLocalPool() 60 INTERCEPTOR(void*, malloc, uptr size) { in INTERCEPTOR() 68 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { in INTERCEPTOR() 76 INTERCEPTOR(void*, realloc, void *ptr, uptr size) { in INTERCEPTOR() 79 uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym; in INTERCEPTOR() [all …]
|
/external/compiler-rt/lib/tsan/rtl/ |
D | tsan_platform.h | 45 static const uptr kMetaShadowBeg = 0x300000000000ull; 46 static const uptr kMetaShadowEnd = 0x400000000000ull; 47 static const uptr kTraceMemBeg = 0x600000000000ull; 48 static const uptr kTraceMemEnd = 0x620000000000ull; 49 static const uptr kShadowBeg = 0x020000000000ull; 50 static const uptr kShadowEnd = 0x100000000000ull; 51 static const uptr kHeapMemBeg = 0x7d0000000000ull; 52 static const uptr kHeapMemEnd = 0x7e0000000000ull; 53 static const uptr kLoAppMemBeg = 0x000000001000ull; 54 static const uptr kLoAppMemEnd = 0x010000000000ull; [all …]
|
D | tsan_rtl.h | 58 static const uptr kAllocatorSpace = 0; 59 static const uptr kAllocatorSize = SANITIZER_MMAP_RANGE_SIZE; 60 static const uptr kAllocatorRegionSizeLog = 20; 61 static const uptr kAllocatorNumRegions = 320 uptr sp; 321 uptr mangled_sp; 324 uptr in_signal_handler; 325 uptr *shadow_stack_pos; 385 uptr *shadow_stack; 386 uptr *shadow_stack_end; [all …]
|
D | tsan_interface_inl.h | 17 #define CALLERPC ((uptr)__builtin_return_address(0)) 22 MemoryRead(cur_thread(), CALLERPC, (uptr)addr, kSizeLog1); in __tsan_read1() 26 MemoryRead(cur_thread(), CALLERPC, (uptr)addr, kSizeLog2); in __tsan_read2() 30 MemoryRead(cur_thread(), CALLERPC, (uptr)addr, kSizeLog4); in __tsan_read4() 34 MemoryRead(cur_thread(), CALLERPC, (uptr)addr, kSizeLog8); in __tsan_read8() 38 MemoryWrite(cur_thread(), CALLERPC, (uptr)addr, kSizeLog1); in __tsan_write1() 42 MemoryWrite(cur_thread(), CALLERPC, (uptr)addr, kSizeLog2); in __tsan_write2() 46 MemoryWrite(cur_thread(), CALLERPC, (uptr)addr, kSizeLog4); in __tsan_write4() 50 MemoryWrite(cur_thread(), CALLERPC, (uptr)addr, kSizeLog8); in __tsan_write8() 54 MemoryRead(cur_thread(), (uptr)pc, (uptr)addr, kSizeLog1); in __tsan_read1_pc() [all …]
|
/external/compiler-rt/lib/sanitizer_common/ |
D | sanitizer_common.h | 36 const uptr kWordSize = SANITIZER_WORDSIZE / 8; 37 const uptr kWordSizeInBits = 8 * kWordSize; 40 const uptr kCacheLineSize = 128; 42 const uptr kCacheLineSize = 64; 45 const uptr kMaxPathLength = 4096; 47 const uptr kMaxThreadStackSize = 1 << 30; // 1Gb 49 static const uptr kErrorMessageBufferSize = 1 << 16; 65 uptr GetPageSize(); 66 extern uptr PageSizeCached; 67 INLINE uptr GetPageSizeCached() { in GetPageSizeCached() [all …]
|
D | sanitizer_allocator.h | 90 template <uptr kMaxSizeLog, uptr kMaxNumCachedT, uptr kMaxBytesCachedLog> 92 static const uptr kMinSizeLog = 4; 93 static const uptr kMidSizeLog = kMinSizeLog + 4; 94 static const uptr kMinSize = 1 << kMinSizeLog; 95 static const uptr kMidSize = 1 << kMidSizeLog; 96 static const uptr kMidClass = kMidSize / kMinSize; 97 static const uptr S = 2; 98 static const uptr M = (1 << S) - 1; 101 static const uptr kMaxNumCached = kMaxNumCachedT; 107 uptr count; [all …]
|
D | sanitizer_stacktrace.h | 40 const uptr *trace; 50 StackTrace(const uptr *trace, u32 size) : trace(trace), size(size), tag(0) {} in StackTrace() 51 StackTrace(const uptr *trace, u32 size, u32 tag) in StackTrace() 65 static uptr GetCurrentPc(); 66 static inline uptr GetPreviousInstructionPc(uptr pc); 67 static uptr GetNextInstructionPc(uptr pc); 74 uptr StackTrace::GetPreviousInstructionPc(uptr pc) { in GetPreviousInstructionPc() 91 uptr trace_buffer[kStackTraceMax]; 92 uptr top_frame_bp; // Optional bp of a top frame. 96 void Init(const uptr *pcs, uptr cnt, uptr extra_top_pc = 0); [all …]
|
D | sanitizer_deadlock_detector.h | 49 void ensureCurrentEpoch(uptr current_epoch) { in ensureCurrentEpoch() 57 uptr getEpoch() const { return epoch_; } in getEpoch() 60 bool addLock(uptr lock_id, uptr current_epoch, u32 stk) { in addLock() 77 void removeLock(uptr lock_id) { in removeLock() 102 u32 findLockContext(uptr lock_id) { in findLockContext() 103 for (uptr i = 0; i < n_all_locks_; i++) in findLockContext() 109 const BV &getLocks(uptr current_epoch) const { in getLocks() 114 uptr getNumLocks() const { return n_all_locks_; } in getNumLocks() 115 uptr getLock(uptr idx) const { return all_locks_with_contexts_[idx].lock; } in getLock() 119 uptr epoch_; [all …]
|
D | sanitizer_coverage_libcdep.cc | 52 static const uptr kNumWordsForMagic = SANITIZER_WORDSIZE == 64 ? 1 : 2; 89 void Extend(uptr npcs); 90 void Add(uptr pc, u32 *guard); 91 void IndirCall(uptr caller, uptr callee, uptr callee_cache[], 92 uptr cache_size); 104 void InitializeGuards(s32 *guards, uptr n, const char *module_name, 105 uptr caller_pc); 106 void InitializeCounters(u8 *counters, uptr n); 108 uptr GetNumberOf8bitCounters(); 109 uptr Update8bitCounterBitsetAndClearCounters(u8 *bitset); [all …]
|
D | sanitizer_win.cc | 37 uptr GetPageSize() { in GetPageSize() 43 uptr GetMmapGranularity() { in GetMmapGranularity() 49 uptr GetMaxVirtualAddress() { in GetMaxVirtualAddress() 52 return (uptr)si.lpMaximumApplicationAddress; in GetMaxVirtualAddress() 59 uptr internal_getpid() { in internal_getpid() 65 uptr GetTid() { in GetTid() 69 uptr GetThreadSelf() { in GetThreadSelf() 74 void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top, in GetThreadStackTopAndBottom() 75 uptr *stack_bottom) { in GetThreadStackTopAndBottom() 83 *stack_top = (uptr)mbi.BaseAddress + mbi.RegionSize; in GetThreadStackTopAndBottom() [all …]
|
D | sanitizer_posix.cc | 47 uptr GetMmapGranularity() { in GetMmapGranularity() 53 static uptr GetKernelAreaSize() { in GetKernelAreaSize() 55 const uptr gbyte = 1UL << 30; in GetKernelAreaSize() 60 uptr end, prot; in GetKernelAreaSize() 90 uptr GetMaxVirtualAddress() { in GetMaxVirtualAddress() 116 uptr res = (1ULL << 32) - 1; // 0xffffffff; in GetMaxVirtualAddress() 119 CHECK_LT(reinterpret_cast<uptr>(&res), res); in GetMaxVirtualAddress() 125 void *MmapOrDie(uptr size, const char *mem_type, bool raw_report) { in MmapOrDie() 127 uptr res = internal_mmap(nullptr, size, in MmapOrDie() 137 void UnmapOrDie(void *addr, uptr size) { in UnmapOrDie() [all …]
|
D | sanitizer_stacktrace.cc | 20 uptr StackTrace::GetNextInstructionPc(uptr pc) { in GetNextInstructionPc() 30 uptr StackTrace::GetCurrentPc() { in GetCurrentPc() 34 void BufferedStackTrace::Init(const uptr *pcs, uptr cnt, uptr extra_top_pc) { in Init() 46 static inline uhwptr *GetCanonicFrame(uptr bp, in GetCanonicFrame() 47 uptr stack_top, in GetCanonicFrame() 48 uptr stack_bottom) { in GetCanonicFrame() 52 if (IsValidFrame((uptr)bp_prev[0], stack_top, stack_bottom)) return bp_prev; in GetCanonicFrame() 55 if (IsValidFrame((uptr)bp_prev[-1], stack_top, stack_bottom)) in GetCanonicFrame() 67 void BufferedStackTrace::FastUnwindStack(uptr pc, uptr bp, uptr stack_top, in FastUnwindStack() 68 uptr stack_bottom, u32 max_depth) { in FastUnwindStack() [all …]
|
D | sanitizer_bvgraph.h | 29 uptr size() const { return kSize; } in size() 32 for (uptr i = 0; i < size(); i++) in clear() 37 for (uptr i = 0; i < size(); i++) in empty() 44 bool addEdge(uptr from, uptr to) { in addEdge() 50 uptr addEdges(const BV &from, uptr to, uptr added_edges[], in addEdges() 51 uptr max_added_edges) { in addEdges() 52 uptr res = 0; in addEdges() 55 uptr node = t1.getAndClearFirstOne(); in addEdges() 69 bool hasEdge(uptr from, uptr to) { return v[from].getBit(to); } in hasEdge() 72 bool removeEdge(uptr from, uptr to) { in removeEdge() [all …]
|
D | sanitizer_procmaps.h | 26 uptr mmaped_size; 27 uptr len; 38 bool Next(uptr *start, uptr *end, uptr *offset, 39 char filename[], uptr filename_size, uptr *protection); 50 static const uptr kProtectionRead = 1; 51 static const uptr kProtectionWrite = 2; 52 static const uptr kProtectionExecute = 4; 53 static const uptr kProtectionShared = 8; 69 bool NextSegmentLoad(uptr *start, uptr *end, uptr *offset, 70 char filename[], uptr filename_size, [all …]
|
/external/compiler-rt/lib/lsan/ |
D | lsan_common.h | 53 uptr pointer_alignment() const { in pointer_alignment() 54 return use_unaligned ? 1 : sizeof(uptr); in pointer_alignment() 64 uptr hit_count; 65 uptr total_size; 73 uptr addr; 74 uptr size; 81 void AddLeakedChunk(uptr chunk, u32 stack_trace_id, uptr leaked_size, 83 void ReportTopLeaks(uptr max_leaks); 86 uptr UnsuppressedLeakCount(); 90 void PrintReportForLeak(uptr index); [all …]
|
/external/compiler-rt/lib/tsan/go/ |
D | tsan_go.cc | 27 bool IsExpectedReport(uptr addr, uptr size) { in IsExpectedReport() 31 void *internal_alloc(MBlockType typ, uptr sz) { in internal_alloc() 40 static void (*go_runtime_cb)(uptr cmd, void *ctx); 49 uptr pc; 52 uptr line; 53 uptr off; 54 uptr res; 57 SymbolizedStack *SymbolizeCode(uptr addr) { in SymbolizeCode() 75 uptr addr; 76 uptr heap; [all …]
|
/external/compiler-rt/lib/interception/ |
D | interception_win.cc | 150 static bool DistanceIsWithin2Gig(uptr from, uptr target) { in DistanceIsWithin2Gig() 152 return target - from <= (uptr)0x7FFFFFFFU; in DistanceIsWithin2Gig() 154 return from - target <= (uptr)0x80000000U; in DistanceIsWithin2Gig() 157 static uptr GetMmapGranularity() { in GetMmapGranularity() 163 static uptr RoundUpTo(uptr size, uptr boundary) { in RoundUpTo() 183 uptr address, uptr size, DWORD *old_protection) { in ChangeMemoryProtection() 190 uptr address, uptr size, DWORD old_protection) { in RestoreMemoryProtection() 197 static bool IsMemoryPadding(uptr address, uptr size) { in IsMemoryPadding() 211 static bool FunctionHasPrefix(uptr address, const T &pattern) { in FunctionHasPrefix() 219 static bool FunctionHasPadding(uptr address, uptr size) { in FunctionHasPadding() [all …]
|
D | interception_win.h | 29 bool OverrideFunction(uptr old_func, uptr new_func, uptr *orig_old_func = 0); 32 bool OverrideFunction(const char *name, uptr new_func, uptr *orig_old_func = 0); 35 uptr InternalGetProcAddress(void *module, const char *func_name); 42 const char *function_name, uptr new_function, 43 uptr *orig_old_func); 48 uptr old_func, uptr new_func, uptr *orig_old_func); 53 uptr old_func, uptr new_func, uptr *orig_old_func); 55 uptr old_func, uptr new_func, uptr *orig_old_func); 57 uptr old_func, uptr new_func, uptr *orig_old_func); 67 (::__interception::uptr)WRAP(func), \ [all …]
|
/external/compiler-rt/lib/msan/ |
D | msan_poisoning.cc | 20 DECLARE_REAL(void *, memset, void *dest, int c, uptr n) 21 DECLARE_REAL(void *, memcpy, void *dest, const void *src, uptr n) 22 DECLARE_REAL(void *, memmove, void *dest, const void *src, uptr n) 26 u32 GetOriginIfPoisoned(uptr addr, uptr size) { in GetOriginIfPoisoned() 28 for (uptr i = 0; i < size; ++i) in GetOriginIfPoisoned() 29 if (s[i]) return *(u32 *)SHADOW_TO_ORIGIN(((uptr)s + i) & ~3UL); in GetOriginIfPoisoned() 33 void SetOriginIfPoisoned(uptr addr, uptr src_shadow, uptr size, in SetOriginIfPoisoned() 35 uptr dst_s = MEM_TO_SHADOW(addr); in SetOriginIfPoisoned() 36 uptr src_s = src_shadow; in SetOriginIfPoisoned() 37 uptr src_s_end = src_s + size; in SetOriginIfPoisoned() [all …]
|