Lines Matching refs:uptr
30 ALWAYS_INLINE void SetShadow(uptr ptr, uptr size, uptr class_id, u64 magic) { in SetShadow()
34 for (uptr i = 0; i < (((uptr)1) << 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()
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 uptr collected = 0; in GC()
144 for (uptr class_id = 0; class_id < kNumberOfSizeClasses; class_id++) { in GC()
146 for (uptr i = 0, n = NumberOfFrames(stack_size_log(), class_id); i < n; in GC()
161 for (uptr class_id = 0; class_id < kNumberOfSizeClasses; class_id++) { in ForEachFakeFrame()
163 for (uptr i = 0, n = NumberOfFrames(stack_size_log(), class_id); i < n; in ForEachFakeFrame()
168 uptr begin = reinterpret_cast<uptr>(ff); in ForEachFakeFrame()
202 ALWAYS_INLINE uptr OnMalloc(uptr class_id, uptr size) { in OnMalloc()
205 uptr local_stack; in OnMalloc()
206 uptr real_stack = reinterpret_cast<uptr>(&local_stack); in OnMalloc()
209 uptr ptr = reinterpret_cast<uptr>(ff); in OnMalloc()
214 ALWAYS_INLINE void OnFree(uptr ptr, uptr class_id, uptr size) { in OnFree()
224 extern "C" SANITIZER_INTERFACE_ATTRIBUTE uptr \
225 __asan_stack_malloc_##class_id(uptr size) { \
229 uptr ptr, uptr size) { \
253 uptr frame_beg, frame_end; in __asan_addr_is_in_fake_stack()
255 reinterpret_cast<uptr>(addr), &frame_beg, &frame_end)); in __asan_addr_is_in_fake_stack()
265 void __asan_alloca_poison(uptr addr, uptr size) { in __asan_alloca_poison()
266 uptr LeftRedzoneAddr = addr - kAllocaRedzoneSize; in __asan_alloca_poison()
267 uptr PartialRzAddr = addr + size; in __asan_alloca_poison()
268 uptr RightRzAddr = (PartialRzAddr + kAllocaRedzoneMask) & ~kAllocaRedzoneMask; in __asan_alloca_poison()
269 uptr PartialRzAligned = PartialRzAddr & ~(SHADOW_GRANULARITY - 1); in __asan_alloca_poison()
278 void __asan_allocas_unpoison(uptr top, uptr bottom) { in __asan_allocas_unpoison()