Lines Matching refs:uptr

29 ALWAYS_INLINE void SetShadow(uptr ptr, uptr size, uptr class_id, u64 magic) {  in SetShadow()
33 for (uptr i = 0; i < (((uptr)1) << class_id); i++) { in SetShadow()
44 FakeStack *FakeStack::Create(uptr stack_size_log) { in Create()
45 static uptr kMinStackSizeLog = 16; in Create()
46 static uptr kMaxStackSizeLog = FIRST_32_SECOND_64(24, 28); in Create()
51 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()
88 FakeFrame *FakeStack::Allocate(uptr stack_size_log, uptr class_id, in Allocate()
89 uptr real_stack) { in Allocate()
93 uptr &hint_position = hint_position_[class_id]; in Allocate()
97 uptr pos = ModuloNumberOfFrames(stack_size_log, class_id, hint_position++); in Allocate()
110 *SavedFlagPtr(reinterpret_cast<uptr>(res), class_id) = &flags[pos]; in Allocate()
116 uptr FakeStack::AddrIsInFakeStack(uptr ptr, uptr *frame_beg, uptr *frame_end) { in AddrIsInFakeStack()
117 uptr stack_size_log = this->stack_size_log(); in AddrIsInFakeStack()
118 uptr beg = reinterpret_cast<uptr>(GetFrame(stack_size_log, 0, 0)); in AddrIsInFakeStack()
119 uptr end = reinterpret_cast<uptr>(this) + RequiredSize(stack_size_log); in AddrIsInFakeStack()
121 uptr class_id = (ptr - beg) >> stack_size_log; in AddrIsInFakeStack()
122 uptr base = beg + (class_id << stack_size_log); in AddrIsInFakeStack()
124 CHECK_LT(ptr, base + (((uptr)1) << stack_size_log)); in AddrIsInFakeStack()
125 uptr pos = (ptr - base) >> (kMinStackFrameSizeLog + class_id); in AddrIsInFakeStack()
126 uptr res = base + pos * BytesInSizeClass(class_id); in AddrIsInFakeStack()
142 NOINLINE void FakeStack::GC(uptr real_stack) { in GC()
143 for (uptr class_id = 0; class_id < kNumberOfSizeClasses; class_id++) { in GC()
145 for (uptr i = 0, n = NumberOfFrames(stack_size_log(), class_id); i < n; in GC()
159 for (uptr class_id = 0; class_id < kNumberOfSizeClasses; class_id++) { in ForEachFakeFrame()
161 for (uptr i = 0, n = NumberOfFrames(stack_size_log(), class_id); i < n; in ForEachFakeFrame()
166 uptr begin = reinterpret_cast<uptr>(ff); in ForEachFakeFrame()
206 static ALWAYS_INLINE uptr OnMalloc(uptr class_id, uptr size) { in OnMalloc()
209 uptr local_stack; in OnMalloc()
210 uptr real_stack = reinterpret_cast<uptr>(&local_stack); in OnMalloc()
213 uptr ptr = reinterpret_cast<uptr>(ff); in OnMalloc()
218 static ALWAYS_INLINE uptr OnMallocAlways(uptr class_id, uptr size) { in OnMallocAlways()
222 uptr local_stack; in OnMallocAlways()
223 uptr real_stack = reinterpret_cast<uptr>(&local_stack); in OnMallocAlways()
227 uptr ptr = reinterpret_cast<uptr>(ff); in OnMallocAlways()
232 static ALWAYS_INLINE void OnFree(uptr ptr, uptr class_id, uptr size) { in OnFree()
242 extern "C" SANITIZER_INTERFACE_ATTRIBUTE uptr \
243 __asan_stack_malloc_##class_id(uptr size) { \
246 extern "C" SANITIZER_INTERFACE_ATTRIBUTE uptr \
247 __asan_stack_malloc_always_##class_id(uptr size) { \
251 uptr ptr, uptr size) { \
279 uptr frame_beg, frame_end; in __asan_addr_is_in_fake_stack()
281 reinterpret_cast<uptr>(addr), &frame_beg, &frame_end)); in __asan_addr_is_in_fake_stack()
291 void __asan_alloca_poison(uptr addr, uptr size) { in __asan_alloca_poison()
292 uptr LeftRedzoneAddr = addr - kAllocaRedzoneSize; in __asan_alloca_poison()
293 uptr PartialRzAddr = addr + size; in __asan_alloca_poison()
294 uptr RightRzAddr = (PartialRzAddr + kAllocaRedzoneMask) & ~kAllocaRedzoneMask; in __asan_alloca_poison()
295 uptr PartialRzAligned = PartialRzAddr & ~(ASAN_SHADOW_GRANULARITY - 1); in __asan_alloca_poison()
304 void __asan_allocas_unpoison(uptr top, uptr bottom) { in __asan_allocas_unpoison()