Home
last modified time | relevance | path

Searched refs:uptr (Results 1 – 25 of 231) sorted by relevance

12345678910

/external/compiler-rt/lib/asan/
Dasan_interface_internal.h25 using __sanitizer::uptr;
44 uptr beg; // The address of the global.
45 uptr size; // The original size of the global.
46 uptr size_with_redzone; // The size with the redzone.
50 uptr has_dynamic_init; // Non-zero if the global has dynamic initializer.
58 void __asan_register_globals(__asan_global *globals, uptr n);
60 void __asan_unregister_globals(__asan_global *globals, uptr n);
74 void __asan_poison_stack_memory(uptr addr, uptr size);
76 void __asan_unpoison_stack_memory(uptr addr, uptr size);
83 void __asan_poison_memory_region(void const volatile *addr, uptr size);
[all …]
Dasan_fake_stack.h24 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 …]
Dasan_report.h22 uptr beg;
23 uptr size;
25 uptr name_len;
30 uptr name_size;
31 uptr region_address;
32 uptr region_size;
38 void DescribeHeapAddress(uptr addr, uptr access_size);
39 bool DescribeAddressIfGlobal(uptr addr, uptr access_size);
40 bool DescribeAddressRelativeToGlobal(uptr addr, uptr access_size,
42 bool IsAddressNearGlobal(uptr addr, const __asan_global &g);
[all …]
Dasan_poisoning.cc34 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 …]
Dasan_allocator.h32 static const uptr kNumberOfSizeClasses = 255;
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();
63 bool AddrIsInside(uptr addr, uptr access_size, sptr *offset) { in AddrIsInside()
70 bool AddrIsAtLeft(uptr addr, uptr access_size, sptr *offset) { in AddrIsAtLeft()
78 bool AddrIsAtRight(uptr addr, uptr access_size, sptr *offset) { in AddrIsAtRight()
90 AsanChunkView FindHeapChunkByAddress(uptr address);
[all …]
Dasan_stats.h28 uptr mallocs;
29 uptr malloced;
30 uptr malloced_redzones;
31 uptr frees;
32 uptr freed;
33 uptr real_frees;
34 uptr really_freed;
35 uptr really_freed_redzones;
36 uptr reallocs;
37 uptr realloced;
[all …]
Dasan_fake_stack.cc26 ALWAYS_INLINE void SetShadow(uptr ptr, uptr size, uptr class_id, u64 magic) { in SetShadow()
30 for (uptr i = 0; i < (1U << class_id); i++) { in SetShadow()
40 FakeStack *FakeStack::Create(uptr stack_size_log) { in Create()
41 static uptr kMinStackSizeLog = 16; in Create()
42 static uptr kMaxStackSizeLog = FIRST_32_SECOND_64(24, 28); in Create()
47 uptr size = RequiredSize(stack_size_log); in Create()
65 for (uptr class_id = 0; class_id < kNumberOfSizeClasses; class_id++) in Destroy()
70 uptr size = RequiredSize(stack_size_log_); in Destroy()
71 FlushUnneededASanShadowMemory(reinterpret_cast<uptr>(this), size); in Destroy()
76 PoisonShadow(reinterpret_cast<uptr>(this), RequiredSize(stack_size_log()), in PoisonAll()
[all …]
Dasan_malloc_linux.cc39 INTERCEPTOR(void*, malloc, uptr size) { in INTERCEPTOR()
44 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { in INTERCEPTOR()
47 const uptr kCallocPoolSize = 1024; in INTERCEPTOR()
48 static uptr calloc_memory_for_dlsym[kCallocPoolSize]; in INTERCEPTOR()
49 static uptr allocated; in INTERCEPTOR()
50 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; in INTERCEPTOR()
60 INTERCEPTOR(void*, realloc, void *ptr, uptr size) { in INTERCEPTOR()
65 INTERCEPTOR(void*, memalign, uptr boundary, uptr size) { in INTERCEPTOR()
70 INTERCEPTOR(void*, aligned_alloc, uptr boundary, uptr size) { in INTERCEPTOR()
75 INTERCEPTOR(void*, __libc_memalign, uptr boundary, uptr size) { in INTERCEPTOR()
[all …]
/external/compiler-rt/lib/tsan/rtl/
Dtsan_platform.h44 const uptr kMetaShadowBeg = 0x300000000000ull;
45 const uptr kMetaShadowEnd = 0x400000000000ull;
46 const uptr kTraceMemBeg = 0x600000000000ull;
47 const uptr kTraceMemEnd = 0x620000000000ull;
48 const uptr kShadowBeg = 0x020000000000ull;
49 const uptr kShadowEnd = 0x100000000000ull;
50 const uptr kHeapMemBeg = 0x7d0000000000ull;
51 const uptr kHeapMemEnd = 0x7e0000000000ull;
52 const uptr kLoAppMemBeg = 0x000000001000ull;
53 const uptr kLoAppMemEnd = 0x010000000000ull;
[all …]
Dtsan_rtl.h58 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 =
319 uptr sp;
320 uptr mangled_sp;
323 uptr in_signal_handler;
324 uptr *shadow_stack_pos;
354 uptr *shadow_stack;
355 uptr *shadow_stack_end;
[all …]
/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_common.h31 const uptr kWordSize = SANITIZER_WORDSIZE / 8;
32 const uptr kWordSizeInBits = 8 * kWordSize;
35 const uptr kCacheLineSize = 128;
37 const uptr kCacheLineSize = 64;
40 const uptr kMaxPathLength = 4096;
43 static const uptr kMaxNumberOfModules = 1 << 14;
45 const uptr kMaxThreadStackSize = 1 << 30; // 1Gb
57 uptr GetPageSize();
58 uptr GetPageSizeCached();
59 uptr GetMmapGranularity();
[all …]
Dsanitizer_stacktrace.h42 const uptr *trace;
52 StackTrace(const uptr *trace, u32 size) : trace(trace), size(size), tag(0) {} in StackTrace()
53 StackTrace(const uptr *trace, u32 size, u32 tag) in StackTrace()
67 static uptr GetCurrentPc();
68 static inline uptr GetPreviousInstructionPc(uptr pc);
69 static uptr GetNextInstructionPc(uptr pc);
76 uptr StackTrace::GetPreviousInstructionPc(uptr pc) { in GetPreviousInstructionPc()
93 uptr trace_buffer[kStackTraceMax];
94 uptr top_frame_bp; // Optional bp of a top frame.
98 void Init(const uptr *pcs, uptr cnt, uptr extra_top_pc = 0);
[all …]
Dsanitizer_allocator.h90 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 …]
Dsanitizer_deadlock_detector.h49 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 …]
Dsanitizer_procmaps.h26 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 …]
Dsanitizer_stacktrace.cc20 uptr StackTrace::GetNextInstructionPc(uptr pc) { in GetNextInstructionPc()
28 uptr StackTrace::GetCurrentPc() { in GetCurrentPc()
32 void BufferedStackTrace::Init(const uptr *pcs, uptr cnt, uptr extra_top_pc) { in Init()
42 static inline bool IsValidFrame(uptr frame, uptr stack_top, uptr stack_bottom) { in IsValidFrame()
49 static inline uhwptr *GetCanonicFrame(uptr bp, in GetCanonicFrame()
50 uptr stack_top, in GetCanonicFrame()
51 uptr stack_bottom) { in GetCanonicFrame()
55 if (IsValidFrame((uptr)bp_prev[0], stack_top, stack_bottom)) return bp_prev; in GetCanonicFrame()
58 if (IsValidFrame((uptr)bp_prev[-1], stack_top, stack_bottom)) in GetCanonicFrame()
70 void BufferedStackTrace::FastUnwindStack(uptr pc, uptr bp, uptr stack_top, in FastUnwindStack()
[all …]
Dsanitizer_coverage_libcdep.cc81 void Extend(uptr npcs);
82 void Add(uptr pc, u32 *guard);
83 void IndirCall(uptr caller, uptr callee, uptr callee_cache[],
84 uptr cache_size);
96 void InitializeGuards(s32 *guards, uptr n, const char *module_name,
97 uptr caller_pc);
98 void InitializeCounters(u8 *counters, uptr n);
100 uptr GetNumberOf8bitCounters();
101 uptr Update8bitCounterBitsetAndClearCounters(u8 *bitset);
103 uptr *data();
[all …]
Dsanitizer_mac.cc53 uptr internal_mmap(void *addr, size_t length, int prot, int flags, in internal_mmap()
55 return (uptr)mmap(addr, length, prot, flags, fd, offset); in internal_mmap()
58 uptr internal_munmap(void *addr, uptr length) { in internal_munmap()
62 int internal_mprotect(void *addr, uptr length, int prot) { in internal_mprotect()
66 uptr internal_close(fd_t fd) { in internal_close()
70 uptr internal_open(const char *filename, int flags) { in internal_open()
74 uptr internal_open(const char *filename, int flags, u32 mode) { in internal_open()
78 uptr internal_read(fd_t fd, void *buf, uptr count) { in internal_read()
82 uptr internal_write(fd_t fd, const void *buf, uptr count) { in internal_write()
86 uptr internal_stat(const char *path, void *buf) { in internal_stat()
[all …]
Dsanitizer_bvgraph.h29 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 …]
Dsanitizer_win.cc37 uptr GetPageSize() { in GetPageSize()
41 uptr GetMmapGranularity() { in GetMmapGranularity()
45 uptr GetMaxVirtualAddress() { in GetMaxVirtualAddress()
48 return (uptr)si.lpMaximumApplicationAddress; in GetMaxVirtualAddress()
55 uptr internal_getpid() { in internal_getpid()
61 uptr GetTid() { in GetTid()
65 uptr GetThreadSelf() { in GetThreadSelf()
70 void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top, in GetThreadStackTopAndBottom()
71 uptr *stack_bottom) { in GetThreadStackTopAndBottom()
79 *stack_top = (uptr)mbi.BaseAddress + mbi.RegionSize; in GetThreadStackTopAndBottom()
[all …]
Dsanitizer_posix.cc46 uptr GetMmapGranularity() { in GetMmapGranularity()
52 static uptr GetKernelAreaSize() { in GetKernelAreaSize()
54 const uptr gbyte = 1UL << 30; in GetKernelAreaSize()
59 uptr end, prot; in GetKernelAreaSize()
89 uptr GetMaxVirtualAddress() { in GetMaxVirtualAddress()
106 uptr res = (1ULL << 32) - 1; // 0xffffffff; in GetMaxVirtualAddress()
109 CHECK_LT(reinterpret_cast<uptr>(&res), res); in GetMaxVirtualAddress()
114 void *MmapOrDie(uptr size, const char *mem_type) { in MmapOrDie()
116 uptr res = internal_mmap(0, size, in MmapOrDie()
139 void UnmapOrDie(void *addr, uptr size) { in UnmapOrDie()
[all …]
/external/compiler-rt/lib/lsan/
Dlsan_common.h52 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/
Dtsan_go.cc27 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/
Dmsan_poisoning.cc20 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/
Dtsan_sync_test.cc23 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 …]

12345678910