Home
last modified time | relevance | path

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

123456

/external/compiler-rt/lib/asan/
Dasan_allocator.h38 static const uptr kNumberOfSizeClasses = 255;
47 uptr Beg(); // first byte of user memory.
48 uptr End(); // last byte of user memory.
49 uptr UsedSize(); // size requested by the user.
50 uptr AllocTid();
51 uptr FreeTid();
54 bool AddrIsInside(uptr addr, uptr access_size, sptr *offset) { in AddrIsInside()
61 bool AddrIsAtLeft(uptr addr, uptr access_size, sptr *offset) { in AddrIsAtLeft()
69 bool AddrIsAtRight(uptr addr, uptr access_size, sptr *offset) { in AddrIsAtRight()
81 AsanChunkView FindHeapChunkByAddress(uptr address);
[all …]
Dasan_interface_internal.h20 using __sanitizer::uptr;
33 uptr beg; // The address of the global.
34 uptr size; // The original size of the global.
35 uptr size_with_redzone; // The size with the redzone.
38 uptr has_dynamic_init; // Non-zero if the global has dynamic initializer.
43 void __asan_register_globals(__asan_global *globals, uptr n)
45 void __asan_unregister_globals(__asan_global *globals, uptr n)
51 void __asan_before_dynamic_init(uptr first_addr, uptr last_addr)
60 uptr __asan_stack_malloc(uptr size, uptr real_stack)
62 void __asan_stack_free(uptr ptr, uptr size, uptr real_stack)
[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_report.h23 void DescribeHeapAddress(uptr addr, uptr access_size);
24 bool DescribeAddressIfGlobal(uptr addr, uptr access_size);
25 bool DescribeAddressRelativeToGlobal(uptr addr, uptr access_size,
27 bool DescribeAddressIfShadow(uptr addr);
28 bool DescribeAddressIfStack(uptr addr, uptr access_size);
30 void DescribeAddress(uptr addr, uptr access_size);
35 void NORETURN ReportSIGSEGV(uptr pc, uptr sp, uptr bp, uptr addr);
36 void NORETURN ReportDoubleFree(uptr addr, StackTrace *stack);
37 void NORETURN ReportFreeNotMalloced(uptr addr, StackTrace *stack);
38 void NORETURN ReportAllocTypeMismatch(uptr addr, StackTrace *stack,
[all …]
Dasan_allocator.cc43 #define REDZONE ((uptr)(flags()->redzone))
44 static const uptr kMinAllocSize = REDZONE * 2;
46 static const uptr kMaxThreadLocalQuarantine = 1 << 20; // 1M
48 static const uptr kMinMmapSize = (ASAN_LOW_MEMORY) ? 4UL << 17 : 4UL << 20;
49 static const uptr kMaxSizeForThreadLocalFreeList =
54 static const uptr kMallocSizeClassStepLog = 26;
55 static const uptr kMallocSizeClassStep = 1UL << kMallocSizeClassStepLog;
57 static const uptr kMaxAllowedMallocSize =
60 static inline uptr SizeClassToSize(u8 size_class) { in SizeClassToSize()
69 static inline u8 SizeToSizeClass(uptr size) { in SizeToSizeClass()
[all …]
Dasan_allocator2.cc34 void OnMap(uptr p, uptr size) const { in OnMap()
41 void OnUnmap(uptr p, uptr size) const { in OnUnmap()
47 uptr page_size = GetPageSizeCached(); in OnUnmap()
48 uptr shadow_beg = RoundUpTo(MemToShadow(p), page_size); in OnUnmap()
49 uptr shadow_end = RoundDownTo(MemToShadow(p + size), page_size); in OnUnmap()
60 const uptr kAllocatorSpace = 0xa0000000000ULL;
62 const uptr kAllocatorSpace = 0x600000000000ULL;
64 const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
91 static const uptr kMaxAllowedMallocSize =
94 static const uptr kMaxThreadLocalQuarantine =
[all …]
Dasan_fake_stack.cc25 bool FakeStack::AddrIsInSizeClass(uptr addr, uptr size_class) { in AddrIsInSizeClass()
26 uptr mem = allocated_size_classes_[size_class]; in AddrIsInSizeClass()
27 uptr size = ClassMmapSize(size_class); in AddrIsInSizeClass()
32 uptr FakeStack::AddrIsInFakeStack(uptr addr) { in AddrIsInFakeStack()
33 for (uptr i = 0; i < kNumberOfSizeClasses; i++) { in AddrIsInFakeStack()
40 inline uptr FakeStack::ComputeSizeClass(uptr alloc_size) { in ComputeSizeClass()
41 uptr rounded_size = RoundUpToPowerOfTwo(alloc_size); in ComputeSizeClass()
42 uptr log = Log2(rounded_size); in ComputeSizeClass()
48 uptr res = log < kMinStackFrameSizeLog ? 0 : log - kMinStackFrameSizeLog; in ComputeSizeClass()
80 void FakeStack::Init(uptr stack_size) { in Init()
[all …]
Dasan_malloc_linux.cc25 DECLARE_REAL_AND_INTERCEPTOR(void*, malloc, uptr size)
27 DECLARE_REAL_AND_INTERCEPTOR(void*, calloc, uptr nmemb, uptr size)
28 DECLARE_REAL_AND_INTERCEPTOR(void*, realloc, void *ptr, uptr size)
29 DECLARE_REAL_AND_INTERCEPTOR(void*, memalign, uptr boundary, uptr size)
32 void* (*malloc)(uptr bytes);
34 void* (*calloc)(uptr n_elements, uptr elem_size);
35 void* (*realloc)(void* oldMem, uptr bytes);
36 void* (*memalign)(uptr alignment, uptr bytes);
72 INTERCEPTOR(void*, malloc, uptr size) { in INTERCEPTOR()
77 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { in INTERCEPTOR()
[all …]
/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_stacktrace.h20 static const uptr kStackTraceMax = 256;
25 uptr size;
26 uptr max_size;
27 uptr trace[kStackTraceMax];
28 static void PrintStack(const uptr *addr, uptr size,
31 void CopyTo(uptr *dst, uptr dst_size) { in CopyTo()
32 for (uptr i = 0; i < size && i < dst_size; i++) in CopyTo()
34 for (uptr i = size; i < dst_size; i++) in CopyTo()
38 void CopyFrom(uptr *src, uptr src_size) { in CopyFrom()
41 for (uptr i = 0; i < size; i++) { in CopyFrom()
[all …]
Dsanitizer_allocator.h87 template <uptr kMaxSizeLog, uptr kMaxNumCachedT, uptr kMaxBytesCachedLog>
89 static const uptr kMinSizeLog = 4;
90 static const uptr kMidSizeLog = kMinSizeLog + 4;
91 static const uptr kMinSize = 1 << kMinSizeLog;
92 static const uptr kMidSize = 1 << kMidSizeLog;
93 static const uptr kMidClass = kMidSize / kMinSize;
94 static const uptr S = 2;
95 static const uptr M = (1 << S) - 1;
98 static const uptr kMaxNumCached = kMaxNumCachedT;
104 uptr count;
[all …]
Dsanitizer_common.h26 const uptr kWordSize = SANITIZER_WORDSIZE / 8;
27 const uptr kWordSizeInBits = 8 * kWordSize;
30 const uptr kCacheLineSize = 128;
32 const uptr kCacheLineSize = 64;
36 extern uptr SanitizerVerbosity;
38 uptr GetPageSize();
39 uptr GetPageSizeCached();
40 uptr GetMmapGranularity();
43 uptr GetTid();
44 uptr GetThreadSelf();
[all …]
Dsanitizer_procmaps.h26 bool GetObjectNameAndOffset(uptr addr, uptr *offset, in GetObjectNameAndOffset()
27 char filename[], uptr filename_size, in GetObjectNameAndOffset()
28 uptr *protection) { in GetObjectNameAndOffset()
37 uptr mmaped_size;
38 uptr len;
45 bool Next(uptr *start, uptr *end, uptr *offset,
46 char filename[], uptr filename_size, uptr *protection);
50 bool GetObjectNameAndOffset(uptr addr, uptr *offset,
51 char filename[], uptr filename_size,
52 uptr *protection);
[all …]
Dsanitizer_symbolizer.h34 uptr address;
36 uptr module_offset;
48 void FillAddressAndModuleInfo(uptr addr, const char *mod_name, in FillAddressAndModuleInfo()
49 uptr mod_offset) { in FillAddressAndModuleInfo()
57 uptr address;
59 uptr module_offset;
61 uptr start;
62 uptr size;
69 uptr SymbolizeCode(uptr address, AddressInfo *frames, uptr max_frames);
70 bool SymbolizeData(uptr address, DataInfo *info);
[all …]
Dsanitizer_stacktrace.cc29 uptr StackTrace::GetPreviousInstructionPc(uptr pc) { in GetPreviousInstructionPc()
44 static void PrintStackFramePrefix(uptr frame_num, uptr pc) { in PrintStackFramePrefix()
59 static void PrintModuleAndOffset(const char *module, uptr offset, in PrintModuleAndOffset()
64 void StackTrace::PrintStack(const uptr *addr, uptr size, in PrintStack()
70 uptr frame_num = 0; in PrintStack()
71 for (uptr i = 0; i < size && addr[i]; i++) { in PrintStack()
74 uptr pc = GetPreviousInstructionPc(addr[i]); in PrintStack()
75 uptr addr_frames_num = 0; // The number of stack frames for current in PrintStack()
92 for (uptr j = 0; j < addr_frames_num; j++) { in PrintStack()
114 uptr offset; in PrintStack()
[all …]
Dsanitizer_libc.cc22 void *internal_memchr(const void *s, int c, uptr n) { in internal_memchr()
24 for (uptr i = 0; i < n; ++i, ++t) in internal_memchr()
30 int internal_memcmp(const void* s1, const void* s2, uptr n) { in internal_memcmp()
33 for (uptr i = 0; i < n; ++i, ++t1, ++t2) in internal_memcmp()
39 void *internal_memcpy(void *dest, const void *src, uptr n) { in internal_memcpy()
42 for (uptr i = 0; i < n; ++i) in internal_memcpy()
47 void *internal_memmove(void *dest, const void *src, uptr n) { in internal_memmove()
64 void *internal_memset(void* s, int c, uptr n) { in internal_memset()
70 for (uptr i = 0; i < n; ++i, ++t) { in internal_memset()
76 uptr internal_strcspn(const char *s, const char *reject) { in internal_strcspn()
[all …]
Dsanitizer_libc.h28 void *internal_memchr(const void *s, int c, uptr n);
29 int internal_memcmp(const void* s1, const void* s2, uptr n);
30 void *internal_memcpy(void *dest, const void *src, uptr n);
31 void *internal_memmove(void *dest, const void *src, uptr n);
33 void *internal_memset(void *s, int c, uptr n);
36 uptr internal_strcspn(const char *s, const char *reject);
38 uptr internal_strlen(const char *s);
39 char *internal_strncat(char *dst, const char *src, uptr n);
40 int internal_strncmp(const char *s1, const char *s2, uptr n);
41 char *internal_strncpy(char *dst, const char *src, uptr n);
[all …]
Dsanitizer_posix.cc35 uptr GetPageSize() { in GetPageSize()
39 uptr GetMmapGranularity() { in GetMmapGranularity()
51 uptr GetThreadSelf() { in GetThreadSelf()
52 return (uptr)pthread_self(); in GetThreadSelf()
55 void *MmapOrDie(uptr size, const char *mem_type) { in MmapOrDie()
77 void UnmapOrDie(void *addr, uptr size) { in UnmapOrDie()
87 void *MmapFixedNoReserve(uptr fixed_addr, uptr size) { in MmapFixedNoReserve()
88 uptr PageSize = GetPageSizeCached(); in MmapFixedNoReserve()
101 void *MmapFixedOrDie(uptr fixed_addr, uptr size) { in MmapFixedOrDie()
102 uptr PageSize = GetPageSizeCached(); in MmapFixedOrDie()
[all …]
Dsanitizer_mac.cc49 int internal_munmap(void *addr, uptr length) { in internal_munmap()
70 uptr internal_read(fd_t fd, void *buf, uptr count) { in internal_read()
74 uptr internal_write(fd_t fd, const void *buf, uptr count) { in internal_write()
90 uptr internal_filesize(fd_t fd) { in internal_filesize()
94 return (uptr)st.st_size; in internal_filesize()
101 uptr internal_readlink(const char *path, char *buf, uptr bufsize) { in internal_readlink()
122 uptr GetTid() { in GetTid()
123 return reinterpret_cast<uptr>(pthread_self()); in GetTid()
126 void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top, in GetThreadStackTopAndBottom()
127 uptr *stack_bottom) { in GetThreadStackTopAndBottom()
[all …]
Dsanitizer_win.cc29 uptr GetPageSize() { in GetPageSize()
33 uptr GetMmapGranularity() { in GetMmapGranularity()
45 uptr GetThreadSelf() { in GetThreadSelf()
49 void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top, in GetThreadStackTopAndBottom()
50 uptr *stack_bottom) { in GetThreadStackTopAndBottom()
58 *stack_top = (uptr)mbi.BaseAddress + mbi.RegionSize; in GetThreadStackTopAndBottom()
59 *stack_bottom = (uptr)mbi.AllocationBase; in GetThreadStackTopAndBottom()
62 void *MmapOrDie(uptr size, const char *mem_type) { in MmapOrDie()
72 void UnmapOrDie(void *addr, uptr size) { in UnmapOrDie()
80 void *MmapFixedNoReserve(uptr fixed_addr, uptr size) { in MmapFixedNoReserve()
[all …]
/external/compiler-rt/lib/tsan/rtl/
Dtsan_platform.h67 static const uptr kLinuxAppMemBeg = 0x000000000000ULL;
68 static const uptr kLinuxAppMemEnd = 0x00fcffffffffULL;
70 static const uptr kLinuxShadowMsk = 0x010000000000ULL;
72 static const uptr kLinuxShadowMsk = 0x100000000000ULL;
78 static const uptr kLinuxAppMemBeg = 0x290000000000ULL;
79 static const uptr kLinuxAppMemEnd = 0x7fffffffffffULL;
81 static const uptr kLinuxAppMemBeg = 0x7cf000000000ULL;
82 static const uptr kLinuxAppMemEnd = 0x7fffffffffffULL;
85 static const uptr kLinuxAppMemMsk = 0x7c0000000000ULL;
88 const uptr kTraceMemBegin = 0x056000000000ULL;
[all …]
Dtsan_sync.h31 StackTrace(uptr *buf, uptr cnt);
35 void Init(const uptr *pcs, uptr cnt);
36 void ObtainCurrent(ThreadState *thr, uptr toppc);
38 uptr Size() const;
39 uptr Get(uptr i) const;
40 const uptr *Begin() const;
44 uptr n_;
45 uptr *s_;
46 const uptr c_;
53 explicit SyncVar(uptr addr, u64 uid);
[all …]
Dtsan_rtl.h59 void Init(uptr siz, u32 tid, u32 stk) { in Init()
74 uptr Size() const { in Size()
121 const uptr kAllocatorSpace = 0x7d0000000000ULL;
123 const uptr kAllocatorSpace = 0x7d0000000000ULL;
125 const uptr kAllocatorSize = 0x10000000000ULL; // 1T.
404 uptr *shadow_stack_pos;
410 uptr shadow_stack[kShadowStackSize];
413 uptr *shadow_stack;
414 uptr *shadow_stack_end;
428 const uptr stk_addr;
[all …]
Dtsan_fd.h42 void FdAcquire(ThreadState *thr, uptr pc, int fd);
43 void FdRelease(ThreadState *thr, uptr pc, int fd);
44 void FdAccess(ThreadState *thr, uptr pc, int fd);
45 void FdClose(ThreadState *thr, uptr pc, int fd);
46 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
47 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd);
48 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd);
49 void FdEventCreate(ThreadState *thr, uptr pc, int fd);
50 void FdSignalCreate(ThreadState *thr, uptr pc, int fd);
51 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd);
[all …]
Dtsan_interface_ann.cc24 #define CALLERPC ((uptr)__builtin_return_address(0))
33 uptr pc) in ScopedAnnotation()
56 const uptr pc = (uptr)__builtin_return_address(0); \
60 (uptr)__builtin_return_address(0)); \
70 uptr addr;
71 uptr size;
91 char *f, int l, uptr addr, uptr size, char *desc) { in AddExpectRace()
116 static ExpectRace *FindRace(ExpectRace *list, uptr addr, uptr size) { in FindRace()
118 uptr maxbegin = max(race->addr, addr); in FindRace()
119 uptr minend = min(race->addr + race->size, addr + size); in FindRace()
[all …]
Dtsan_fd.cc57 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref()
63 SyncVar *v = CTX()->synctab.GetAndRemove(thr, pc, (uptr)s); in unref()
71 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc()
74 uptr l1 = atomic_load(pl1, memory_order_consume); in fddesc()
76 uptr size = kTableSizeL2 * sizeof(FdDesc); in fddesc()
79 MemoryResetRange(thr, (uptr)&fddesc, (uptr)p, size); in fddesc()
80 if (atomic_compare_exchange_strong(pl1, &l1, (uptr)p, memory_order_acq_rel)) in fddesc()
81 l1 = (uptr)p; in fddesc()
89 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s) { in init()
108 MemoryRangeImitateWrite(thr, pc, (uptr)d, 8); in init()
[all …]

123456