/external/compiler-rt/lib/asan/ |
asan_fake_stack.cc | 26 ALWAYS_INLINE void SetShadow(uptr ptr, uptr size, uptr class_id, u64 magic) { 30 for (uptr i = 0; i < (1U << class_id); i++) 38 FakeStack *FakeStack::Create(uptr stack_size_log) { 39 static uptr kMinStackSizeLog = 16; 40 static uptr kMaxStackSizeLog = FIRST_32_SECOND_64(24, 28); 45 uptr size = RequiredSize(stack_size_log); 63 for (uptr class_id = 0; class_id < kNumberOfSizeClasses; class_id++) 68 uptr size = RequiredSize(stack_size_log_) [all...] |
asan_poisoning.cc | 23 void PoisonShadow(uptr addr, uptr size, u8 value) { 33 void PoisonShadowPartialRightRedzone(uptr addr, 34 uptr size, 35 uptr redzone_size, 48 explicit ShadowSegmentEndpoint(uptr address) { 55 void FlushUnneededASanShadowMemory(uptr p, uptr size) { 58 uptr page_size = GetPageSizeCached(); 59 uptr shadow_beg = RoundUpTo(MemToShadow(p), page_size) [all...] |
asan_thread.h | 63 thread_return_t ThreadStart(uptr os_id); 65 uptr stack_top() { return stack_top_; } 66 uptr stack_bottom() { return stack_bottom_; } 67 uptr stack_size() { return stack_size_; } 68 uptr tls_begin() { return tls_begin_; } 69 uptr tls_end() { return tls_end_; } 74 const char *GetFrameNameByAddr(uptr addr, uptr *offset, uptr *frame_pc); 76 bool AddrIsInStack(uptr addr) [all...] |
asan_stats.cc | 34 uptr (&array)[kNumberOfSizeClasses]) { 36 for (uptr i = 0; i < kNumberOfSizeClasses; i++) { 63 uptr *dst_ptr = reinterpret_cast<uptr*>(this); 64 const uptr *src_ptr = reinterpret_cast<const uptr*>(stats); 65 uptr num_fields = sizeof(*this) / sizeof(uptr); 66 for (uptr i = 0; i < num_fields; i++) 77 static uptr max_malloced_memory [all...] |
/external/compiler-rt/lib/sanitizer_common/ |
sanitizer_stacktrace_libcdep.cc | 20 static void PrintStackFramePrefix(InternalScopedString *buffer, uptr frame_num, 21 uptr pc) { 25 void StackTrace::PrintStack(const uptr *addr, uptr size) { 33 uptr frame_num = 0; 34 for (uptr i = 0; i < size && addr[i]; i++) { 37 uptr pc = GetPreviousInstructionPc(addr[i]); 38 uptr addr_frames_num = Symbolizer::GetOrInit()->SymbolizePC( 48 for (uptr j = 0; j < addr_frames_num; j++) { 74 void StackTrace::Unwind(uptr max_depth, uptr pc, uptr bp, void *context [all...] |
sanitizer_bitvector.h | 22 template <class basic_int_t = uptr> 27 uptr size() const { return kSize; } 34 bool setBit(uptr idx) { 41 bool clearBit(uptr idx) { 47 bool getBit(uptr idx) const { return (bits_ & mask(idx)) != 0; } 49 uptr getAndClearFirstOne() { 51 uptr idx = LeastSignificantSetBitIndex(bits_); 85 // uptr idx = it.next(); 93 uptr next() { return bv_.getAndClearFirstOne(); } 100 basic_int_t mask(uptr idx) const [all...] |
sanitizer_libc.cc | 33 void *internal_memchr(const void *s, int c, uptr n) { 35 for (uptr i = 0; i < n; ++i, ++t) 41 int internal_memcmp(const void* s1, const void* s2, uptr n) { 44 for (uptr i = 0; i < n; ++i, ++t1, ++t2) 50 void *internal_memcpy(void *dest, const void *src, uptr n) { 53 for (uptr i = 0; i < n; ++i) 58 void *internal_memmove(void *dest, const void *src, uptr n) { 76 void internal_bzero_aligned16(void *s, uptr n) { 78 CHECK_EQ((reinterpret_cast<uptr>(s) | n) & 15, 0); 85 void *internal_memset(void* s, int c, uptr n) [all...] |
sanitizer_persistent_allocator.h | 25 void *alloc(uptr size); 28 void *tryAlloc(uptr size); 34 inline void *PersistentAllocator::tryAlloc(uptr size) { 37 uptr cmp = atomic_load(®ion_pos, memory_order_acquire); 38 uptr end = atomic_load(®ion_end, memory_order_acquire); 46 inline void *PersistentAllocator::alloc(uptr size) { 56 uptr allocsz = 64 * 1024; 58 uptr mem = (uptr)MmapOrDie(allocsz, "stack depot"); 65 inline void *PersistentAlloc(uptr sz) [all...] |
sanitizer_posix.cc | 36 uptr GetMmapGranularity() { 42 static uptr GetKernelAreaSize() { 44 const uptr gbyte = 1UL << 30; 49 uptr end, prot; 79 uptr GetMaxVirtualAddress() { 94 uptr res = (1ULL << 32) - 1; // 0xffffffff; 97 CHECK_LT(reinterpret_cast<uptr>(&res), res); 102 void *MmapOrDie(uptr size, const char *mem_type) { 104 uptr res = internal_mmap(0, size, 127 void UnmapOrDie(void *addr, uptr size) [all...] |
sanitizer_common.cc | 24 uptr GetPageSizeCached() { 25 static uptr PageSize; 43 uptr report_fd_pid = 0; 47 uptr stoptheworld_tracer_pid = 0; 50 uptr stoptheworld_tracer_ppid = 0; 83 uptr ReadFileToBuffer(const char *file_name, char **buff, 84 uptr *buff_size, uptr max_len) { 85 uptr PageSize = GetPageSizeCached(); 86 uptr kMinFileLen = PageSize [all...] |
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 [all...] |
sanitizer_addrhashmap.h | 10 // Concurrent uptr->T hashmap. 24 // Concurrent uptr->T hashmap. 28 // typedef AddrHashMap<uptr, 11> Map; 43 template<typename T, uptr kSize> 52 uptr cap; 53 uptr size; 57 static const uptr kBucketSize = 3; 70 Handle(AddrHashMap<T, kSize> *map, uptr addr); 71 Handle(AddrHashMap<T, kSize> *map, uptr addr, bool remove); 72 Handle(AddrHashMap<T, kSize> *map, uptr addr, bool remove, bool create) [all...] |
sanitizer_linux_libcdep.cc | 74 void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top, 75 uptr *stack_bottom) { 85 uptr start, end, offset; 86 uptr prev_end = 0; 88 if ((uptr)&rl < end) 92 CHECK((uptr)&rl >= start && (uptr)&rl < end); 96 uptr stacksize = rl.rlim_cur; 111 uptr stacksize = 0; 117 *stack_top = (uptr)stackaddr + stacksize [all...] |
sanitizer_procmaps_mac.cc | 76 uptr *start, uptr *end, uptr *offset, 77 char filename[], uptr filename_size, uptr *protection) { 105 bool MemoryMappingLayout::Next(uptr *start, uptr *end, uptr *offset, 106 char filename[], uptr filename_size, 107 uptr *protection) [all...] |
sanitizer_thread_registry.h | 42 uptr os_id; // PID (used for reporting). 43 uptr user_id; // Some opaque user thread id (e.g. pthread_t). 57 void SetStarted(uptr _os_id, void *arg); 58 void SetCreated(uptr _user_id, u64 _unique_id, bool _detached, 81 void GetNumberOfThreads(uptr *total = 0, uptr *running = 0, uptr *alive = 0); 82 uptr GetMaxAliveThreads(); 94 u32 CreateThread(uptr user_id, bool detached, u32 parent_tid, void *arg); 109 ThreadContextBase *FindThreadContextByOsIDLocked(uptr os_id) [all...] |
/external/compiler-rt/lib/sanitizer_common/tests/ |
sanitizer_stacktrace_test.cc | 23 bool TryFastUnwind(uptr max_depth) { 26 trace.Unwind(max_depth, start_pc, (uptr)&fake_stack[0], 0, fake_top, 31 uptr fake_stack[10]; 32 uptr start_pc; 33 uptr fake_top; 34 uptr fake_bottom; 38 static uptr PC(uptr idx) { 45 for (uptr i = 0; i+1 < ARRAY_SIZE(fake_stack); i += 2) { 46 fake_stack[i] = (uptr)&fake_stack[i+2]; // f [all...] |
sanitizer_common_test.cc | 25 static bool IsSorted(const uptr *array, uptr n) { 26 for (uptr i = 1; i < n; i++) { 33 uptr array[100]; 34 uptr n = 100; 36 for (uptr i = 0; i < n; i++) { 42 for (uptr i = 0; i < n; i++) { 48 for (uptr i = 0; i < n; i++) { 54 for (uptr i = 0; i < n; i++) { 60 for (uptr i = 0; i < n - 1; i++) [all...] |
/external/compiler-rt/lib/msan/ |
msan_interface_internal.h | 59 void __msan_unpoison(const void *a, uptr size); 63 void __msan_clear_and_unpoison(void *a, uptr size); 65 void* __msan_memcpy(void *dst, const void *src, uptr size); 67 void* __msan_memset(void *s, int c, uptr n); 69 void* __msan_memmove(void* dest, const void* src, uptr n); 71 void __msan_poison(const void *a, uptr size); 73 void __msan_poison_stack(void *a, uptr size); 78 void __msan_load_unpoisoned(void *src, uptr size, void *dst); 83 sptr __msan_test_shadow(const void *x, uptr size); 86 void __msan_check_mem_is_initialized(const void *x, uptr size) [all...] |
msan_allocator.cc | 27 uptr requested_size; 31 void OnMap(uptr p, uptr size) const {} 32 void OnUnmap(uptr p, uptr size) const { 43 static const uptr kAllocatorSpace = 0x600000000000ULL; 44 static const uptr kAllocatorSize = 0x80000000000; // 8T. 45 static const uptr kMetadataSize = sizeof(Metadata); 46 static const uptr kMaxAllowedMallocSize = 8UL << 30; 79 static void *MsanAllocate(StackTrace *stack, uptr size, uptr alignment [all...] |
/external/compiler-rt/lib/tsan/tests/unit/ |
tsan_sync_test.cc | 23 m->AllocBlock(thr, 0, (uptr)&block[0], 1 * sizeof(u64)); 24 MBlock *mb = m->GetBlock((uptr)&block[0]); 28 uptr sz = m->FreeBlock(thr, 0, (uptr)&block[0]); 30 mb = m->GetBlock((uptr)&block[0]); 38 m->AllocBlock(thr, 0, (uptr)&block[0], 1 * sizeof(u64)); 39 m->AllocBlock(thr, 0, (uptr)&block[1], 3 * sizeof(u64)); 40 MBlock *mb1 = m->GetBlock((uptr)&block[0]); 42 MBlock *mb2 = m->GetBlock((uptr)&block[1]); 44 m->FreeRange(thr, 0, (uptr)&block[0], 4 * sizeof(u64)) [all...] |
tsan_shadow_test.cc | 55 CHECK(IsAppMem((uptr)&global)); 56 CHECK(IsAppMem((uptr)&stack)); 57 CHECK(IsAppMem((uptr)heap)); 59 CHECK(IsShadowMem(MemToShadow((uptr)&global))); 60 CHECK(IsShadowMem(MemToShadow((uptr)&stack))); 61 CHECK(IsShadowMem(MemToShadow((uptr)heap))); 67 CHECK_EQ((uptr)data % kShadowSize, 0); 68 uptr s0 = MemToShadow((uptr)&data[0]); 71 CHECK_EQ(s0, MemToShadow((uptr)&data[i])) [all...] |
tsan_mutexset_test.cc | 18 static void Expect(const MutexSet &mset, uptr i, u64 id, bool write, u64 epoch, 29 EXPECT_EQ(mset.Size(), (uptr)0); 32 EXPECT_EQ(mset.Size(), (uptr)1); 35 EXPECT_EQ(mset.Size(), (uptr)0); 39 EXPECT_EQ(mset.Size(), (uptr)2); 43 EXPECT_EQ(mset.Size(), (uptr)1); 45 EXPECT_EQ(mset.Size(), (uptr)0); 51 EXPECT_EQ(mset.Size(), (uptr)1); 55 EXPECT_EQ(mset.Size(), (uptr)1); 59 EXPECT_EQ(mset.Size(), (uptr)1) [all...] |
/external/compiler-rt/lib/tsan/rtl/ |
tsan_interface.cc | 19 #define CALLERPC ((uptr)__builtin_return_address(0)) 32 MemoryRead(cur_thread(), CALLERPC, (uptr)addr, kSizeLog8); 33 MemoryRead(cur_thread(), CALLERPC, (uptr)addr + 8, kSizeLog8); 37 MemoryWrite(cur_thread(), CALLERPC, (uptr)addr, kSizeLog8); 38 MemoryWrite(cur_thread(), CALLERPC, (uptr)addr + 8, kSizeLog8); 42 UnalignedMemoryAccess(cur_thread(), CALLERPC, (uptr)addr, 2, false, false); 47 UnalignedMemoryAccess(cur_thread(), CALLERPC, (uptr)addr, 4, false, false); 52 UnalignedMemoryAccess(cur_thread(), CALLERPC, (uptr)addr, 8, false, false); 57 UnalignedMemoryAccess(cur_thread(), CALLERPC, (uptr)addr, 2, true, false); 62 UnalignedMemoryAccess(cur_thread(), CALLERPC, (uptr)addr, 4, true, false) [all...] |
tsan_stack_trace.cc | 26 StackTrace::StackTrace(uptr *buf, uptr cnt) 47 void StackTrace::Init(const uptr *pcs, uptr cnt) { 55 s_ = (uptr*)internal_alloc(MBlockStackTrace, cnt * sizeof(s_[0])); 61 void StackTrace::ObtainCurrent(ThreadState *thr, uptr toppc) { 66 uptr start = 0; 79 s_ = (uptr*)internal_alloc(MBlockStackTrace, 82 for (uptr i = 0; i < n_; i++) 99 uptr StackTrace::Size() const [all...] |
tsan_ignoreset.cc | 17 const uptr IgnoreSet::kMaxSize; 26 for (uptr i = 0; i < size_; i++) { 37 uptr IgnoreSet::Size() const { 41 u32 IgnoreSet::At(uptr i) const {
|