/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. 62 void __asan_register_globals(__asan_global *globals, uptr n); 64 void __asan_unregister_globals(__asan_global *globals, uptr n); 78 void __asan_poison_stack_memory(uptr addr, uptr size); 80 void __asan_unpoison_stack_memory(uptr addr, uptr size); 87 void __asan_poison_memory_region(void const volatile *addr, uptr size); [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() 76 static uptr SizeRequiredForFrames(uptr stack_size_log) { in SizeRequiredForFrames() [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_allocator.h | 54 uptr Beg(); // First byte of user memory. 55 uptr End(); // Last byte of user memory. 56 uptr UsedSize(); // Size requested by the user. 57 uptr AllocTid(); 58 uptr FreeTid(); 62 bool AddrIsInside(uptr addr, uptr access_size, sptr *offset) { in AddrIsInside() 69 bool AddrIsAtLeft(uptr addr, uptr access_size, sptr *offset) { in AddrIsAtLeft() 77 bool AddrIsAtRight(uptr addr, uptr access_size, sptr *offset) { in AddrIsAtRight() 89 AsanChunkView FindHeapChunkByAddress(uptr address); 99 uptr size() { return size_; } in size() [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 < (1U << 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_malloc_linux.cc | 29 static const uptr kCallocPoolSize = 1024; 30 static uptr calloc_memory_for_dlsym[kCallocPoolSize]; 51 INTERCEPTOR(void*, malloc, uptr size) { in INTERCEPTOR() 56 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { in INTERCEPTOR() 59 static uptr allocated; in INTERCEPTOR() 60 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; in INTERCEPTOR() 70 INTERCEPTOR(void*, realloc, void *ptr, uptr size) { in INTERCEPTOR() 73 uptr offset = (uptr)ptr - (uptr)calloc_memory_for_dlsym; in INTERCEPTOR() 74 uptr copy_size = Min(size, kCallocPoolSize - offset); in INTERCEPTOR() 82 INTERCEPTOR(void*, memalign, uptr boundary, uptr size) { 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; 355 uptr *shadow_stack; 356 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 …]
|
D | tsan_sync.h | 31 uptr addr; // overwritten by DenseSlabAlloc freelist 49 void Init(ThreadState *thr, uptr pc, uptr addr, u64 uid); 60 static uptr SplitId(u64 id, u64 *uid) { in SplitId() 62 return (uptr)GetLsb(id, 47); in SplitId() 74 void AllocBlock(ThreadState *thr, uptr pc, uptr p, uptr sz); 75 uptr FreeBlock(ThreadState *thr, uptr pc, uptr p); 76 bool FreeRange(ThreadState *thr, uptr pc, uptr p, uptr sz); 77 void ResetRange(ThreadState *thr, uptr pc, uptr p, uptr sz); 78 MBlock* GetBlock(uptr p); 80 SyncVar* GetOrCreateAndLock(ThreadState *thr, uptr 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; 48 static const uptr kMaxNumberOfModules = 1 << 14; 50 const uptr kMaxThreadStackSize = 1 << 30; // 1Gb 52 static const uptr kErrorMessageBufferSize = 1 << 16; 68 uptr GetPageSize(); 69 uptr GetPageSizeCached(); [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_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_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_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); 47 uptr DumpListOfModules(LoadedModule *modules, uptr max_modules, 51 static const uptr kProtectionRead = 1; 52 static const uptr kProtectionWrite = 2; 53 static const uptr kProtectionExecute = 4; 54 static const uptr kProtectionShared = 8; 70 bool NextSegmentLoad(uptr *start, uptr *end, uptr *offset, [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() 44 static inline bool IsValidFrame(uptr frame, uptr stack_top, uptr stack_bottom) { in IsValidFrame() 51 static inline uhwptr *GetCanonicFrame(uptr bp, in GetCanonicFrame() 52 uptr stack_top, in GetCanonicFrame() 53 uptr stack_bottom) { in GetCanonicFrame() 57 if (IsValidFrame((uptr)bp_prev[0], stack_top, stack_bottom)) return bp_prev; in GetCanonicFrame() 60 if (IsValidFrame((uptr)bp_prev[-1], stack_top, stack_bottom)) in GetCanonicFrame() 72 void BufferedStackTrace::FastUnwindStack(uptr pc, uptr bp, uptr stack_top, in FastUnwindStack() [all …]
|
D | sanitizer_win.cc | 37 uptr GetPageSize() { in GetPageSize() 43 uptr GetMmapGranularity() { in GetMmapGranularity() 47 uptr GetMaxVirtualAddress() { in GetMaxVirtualAddress() 50 return (uptr)si.lpMaximumApplicationAddress; in GetMaxVirtualAddress() 57 uptr internal_getpid() { in internal_getpid() 63 uptr GetTid() { in GetTid() 67 uptr GetThreadSelf() { in GetThreadSelf() 72 void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top, in GetThreadStackTopAndBottom() 73 uptr *stack_bottom) { in GetThreadStackTopAndBottom() 81 *stack_top = (uptr)mbi.BaseAddress + mbi.RegionSize; in GetThreadStackTopAndBottom() [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_coverage_libcdep.cc | 87 void Extend(uptr npcs); 88 void Add(uptr pc, u32 *guard); 89 void IndirCall(uptr caller, uptr callee, uptr callee_cache[], 90 uptr cache_size); 102 void InitializeGuards(s32 *guards, uptr n, const char *module_name, 103 uptr caller_pc); 104 void InitializeCounters(u8 *counters, uptr n); 106 uptr GetNumberOf8bitCounters(); 107 uptr Update8bitCounterBitsetAndClearCounters(u8 *bitset); 109 uptr *data(); [all …]
|
D | sanitizer_libc.h | 30 void *internal_memchr(const void *s, int c, uptr n); 31 void *internal_memrchr(const void *s, int c, uptr n); 32 int internal_memcmp(const void* s1, const void* s2, uptr n); 33 void *internal_memcpy(void *dest, const void *src, uptr n); 34 void *internal_memmove(void *dest, const void *src, uptr n); 36 void internal_bzero_aligned16(void *s, uptr n); 38 void *internal_memset(void *s, int c, uptr n); 42 uptr internal_strcspn(const char *s, const char *reject); 44 char *internal_strndup(const char *s, uptr n); 45 uptr internal_strlen(const char *s); [all …]
|
/external/compiler-rt/lib/lsan/ |
D | lsan_common.h | 52 uptr pointer_alignment() const { in pointer_alignment() 53 return use_unaligned ? 1 : sizeof(uptr); in pointer_alignment() 63 uptr hit_count; 64 uptr total_size; 72 uptr addr; 73 uptr size; 80 void AddLeakedChunk(uptr chunk, u32 stack_trace_id, uptr leaked_size, 82 void ReportTopLeaks(uptr max_leaks); 85 uptr UnsuppressedLeakCount(); 89 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 ReportLocation *SymbolizeData(uptr addr) { in SymbolizeData() 35 void *internal_alloc(MBlockType typ, uptr sz) { in internal_alloc() 44 uptr pc; 47 uptr line; 48 uptr off; 49 uptr res; 55 SymbolizedStack *SymbolizeCode(uptr addr) { in SymbolizeCode() 99 void __tsan_map_shadow(uptr addr, uptr size) { in __tsan_map_shadow() 104 MemoryRead(thr, (uptr)pc, (uptr)addr, kSizeLog1); in __tsan_read() [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 …]
|
/external/compiler-rt/lib/tsan/tests/unit/ |
D | tsan_sync_test.cc | 23 m->AllocBlock(thr, 0, (uptr)&block[0], 1 * sizeof(u64)); in TEST() 24 MBlock *mb = m->GetBlock((uptr)&block[0]); in TEST() 28 uptr sz = m->FreeBlock(thr, 0, (uptr)&block[0]); in TEST() 30 mb = m->GetBlock((uptr)&block[0]); in TEST() 38 m->AllocBlock(thr, 0, (uptr)&block[0], 1 * sizeof(u64)); in TEST() 39 m->AllocBlock(thr, 0, (uptr)&block[1], 3 * sizeof(u64)); in TEST() 40 MBlock *mb1 = m->GetBlock((uptr)&block[0]); in TEST() 42 MBlock *mb2 = m->GetBlock((uptr)&block[1]); in TEST() 44 m->FreeRange(thr, 0, (uptr)&block[0], 4 * sizeof(u64)); in TEST() 45 mb1 = m->GetBlock((uptr)&block[0]); in TEST() [all …]
|