/netbsd-current/sys/external/bsd/compiler_rt/dist/lib/asan/tests/ |
H A D | asan_fake_stack_test.cc | 12 // Tests for FakeStack. 28 TEST(FakeStack, FlagsSize) { 29 EXPECT_EQ(FakeStack::SizeRequiredForFlags(10), 1U << 5); 30 EXPECT_EQ(FakeStack::SizeRequiredForFlags(11), 1U << 6); 31 EXPECT_EQ(FakeStack::SizeRequiredForFlags(20), 1U << 15); 34 TEST(FakeStack, RequiredSize) { 36 // uptr alloc_size = FakeStack::RequiredSize(i); 39 EXPECT_EQ(FakeStack::RequiredSize(15), 365568U); 40 EXPECT_EQ(FakeStack::RequiredSize(16), 727040U); 41 EXPECT_EQ(FakeStack [all...] |
/netbsd-current/external/gpl3/gcc/dist/libsanitizer/asan/ |
H A D | asan_fake_stack.cpp | 11 // FakeStack is used to detect use-after-return bugs. 44 FakeStack *FakeStack::Create(uptr stack_size_log) { 52 FakeStack *res = reinterpret_cast<FakeStack *>( 53 flags()->uar_noreserve ? MmapNoReserveOrDie(size, "FakeStack") 54 : MmapOrDie(size, "FakeStack")); 58 "T%d: FakeStack created: %p -- %p stack_size_log: %zd; " 61 (void *)(p + FakeStack::RequiredSize(stack_size_log)), stack_size_log, 66 void FakeStack [all...] |
H A D | asan_fake_stack.h | 11 // ASan-private header for asan_fake_stack.cpp, implements FakeStack. 36 // The FakeStack objects is allocated by a single mmap call and has no other 41 // FakeStack has kNumberOfSizeClasses (11) size classes, each size class 56 class FakeStack { class in namespace:__asan 64 // CTOR: create the FakeStack as a single mmap-ed object. 65 static FakeStack *Create(uptr stack_size_log); 128 // Poison the entire FakeStack's shadow with the magic value. 158 FakeStack() { } function in class:__asan::FakeStack 170 FakeStack *GetTLSFakeStack(); 171 void SetTLSFakeStack(FakeStack *f [all...] |
H A D | asan_thread.h | 95 FakeStack *t = fake_stack_; 101 void StartSwitchFiber(FakeStack **fake_stack_save, uptr bottom, uptr size); 102 void FinishSwitchFiber(FakeStack *fake_stack_save, uptr *bottom_old, 105 FakeStack *get_fake_stack() { 113 FakeStack *get_or_create_fake_stack() { 141 FakeStack *AsyncSignalSafeLazyInitFakeStack(); 165 FakeStack *fake_stack_;
|
H A D | asan_thread.cpp | 126 void AsanThread::StartSwitchFiber(FakeStack **fake_stack_save, uptr bottom, 137 FakeStack *current_fake_stack = fake_stack_; 147 void AsanThread::FinishSwitchFiber(FakeStack *fake_stack_save, 200 // We want to create the FakeStack lazily on the first use, but not earlier 202 FakeStack *AsanThread::AsyncSignalSafeLazyInitFakeStack() { 204 if (stack_size == 0) // stack_size is not yet available, don't use FakeStack. 222 fake_stack_ = FakeStack::Create(stack_size_log); 341 } else if (FakeStack *fake_stack = get_fake_stack()) { 382 } else if (FakeStack *fake_stack = get_fake_stack()) { 417 FakeStack *fake_stac [all...] |
H A D | asan_rtl.cpp | 591 FakeStack *stack = curr_thread->get_fake_stack();
|
/netbsd-current/sys/external/bsd/compiler_rt/dist/lib/asan/ |
H A D | asan_fake_stack.cc | 12 // FakeStack is used to detect use-after-return bugs. 45 FakeStack *FakeStack::Create(uptr stack_size_log) { 53 FakeStack *res = reinterpret_cast<FakeStack *>( 54 flags()->uar_noreserve ? MmapNoReserveOrDie(size, "FakeStack") 55 : MmapOrDie(size, "FakeStack")); 58 VReport(1, "T%d: FakeStack created: %p -- %p stack_size_log: %zd; " 61 p + FakeStack::RequiredSize(stack_size_log), stack_size_log, 66 void FakeStack [all...] |
H A D | asan_fake_stack.h | 12 // ASan-private header for asan_fake_stack.cc, implements FakeStack. 37 // The FakeStack objects is allocated by a single mmap call and has no other 42 // FakeStack has kNumberOfSizeClasses (11) size classes, each size class 57 class FakeStack { class in namespace:__asan 65 // CTOR: create the FakeStack as a single mmap-ed object. 66 static FakeStack *Create(uptr stack_size_log); 129 // Poison the entire FakeStack's shadow with the magic value. 159 FakeStack() { } function in class:__asan::FakeStack 171 FakeStack *GetTLSFakeStack(); 172 void SetTLSFakeStack(FakeStack *f [all...] |
H A D | asan_thread.h | 100 FakeStack *t = fake_stack_; 106 void StartSwitchFiber(FakeStack **fake_stack_save, uptr bottom, uptr size); 107 void FinishSwitchFiber(FakeStack *fake_stack_save, uptr *bottom_old, 115 FakeStack *fake_stack() { 141 FakeStack *AsyncSignalSafeLazyInitFakeStack(); 165 FakeStack *fake_stack_;
|
H A D | asan_thread.cc | 118 void AsanThread::StartSwitchFiber(FakeStack **fake_stack_save, uptr bottom, 129 FakeStack *current_fake_stack = fake_stack_; 139 void AsanThread::FinishSwitchFiber(FakeStack *fake_stack_save, 192 // We want to create the FakeStack lazyly on the first use, but not eralier 194 FakeStack *AsanThread::AsyncSignalSafeLazyInitFakeStack() { 196 if (stack_size == 0) // stack_size is not yet available, don't use FakeStack. 214 fake_stack_ = FakeStack::Create(stack_size_log); 521 t->StartSwitchFiber((FakeStack**)fakestacksave, (uptr)bottom, size); 533 t->FinishSwitchFiber((FakeStack*)fakestack,
|
/netbsd-current/external/gpl3/gcc.old/dist/libsanitizer/asan/ |
H A D | asan_fake_stack.cc | 10 // FakeStack is used to detect use-after-return bugs. 43 FakeStack *FakeStack::Create(uptr stack_size_log) { 51 FakeStack *res = reinterpret_cast<FakeStack *>( 52 flags()->uar_noreserve ? MmapNoReserveOrDie(size, "FakeStack") 53 : MmapOrDie(size, "FakeStack")); 56 VReport(1, "T%d: FakeStack created: %p -- %p stack_size_log: %zd; " 59 p + FakeStack::RequiredSize(stack_size_log), stack_size_log, 64 void FakeStack [all...] |
H A D | asan_fake_stack.h | 10 // ASan-private header for asan_fake_stack.cc, implements FakeStack. 35 // The FakeStack objects is allocated by a single mmap call and has no other 40 // FakeStack has kNumberOfSizeClasses (11) size classes, each size class 55 class FakeStack { class in namespace:__asan 63 // CTOR: create the FakeStack as a single mmap-ed object. 64 static FakeStack *Create(uptr stack_size_log); 127 // Poison the entire FakeStack's shadow with the magic value. 157 FakeStack() { } function in class:__asan::FakeStack 169 FakeStack *GetTLSFakeStack(); 170 void SetTLSFakeStack(FakeStack *f [all...] |
H A D | asan_thread.h | 98 FakeStack *t = fake_stack_; 104 void StartSwitchFiber(FakeStack **fake_stack_save, uptr bottom, uptr size); 105 void FinishSwitchFiber(FakeStack *fake_stack_save, uptr *bottom_old, 113 FakeStack *fake_stack() { 139 FakeStack *AsyncSignalSafeLazyInitFakeStack(); 163 FakeStack *fake_stack_;
|
H A D | asan_thread.cc | 120 void AsanThread::StartSwitchFiber(FakeStack **fake_stack_save, uptr bottom, 131 FakeStack *current_fake_stack = fake_stack_; 141 void AsanThread::FinishSwitchFiber(FakeStack *fake_stack_save, 194 // We want to create the FakeStack lazyly on the first use, but not eralier 196 FakeStack *AsanThread::AsyncSignalSafeLazyInitFakeStack() { 198 if (stack_size == 0) // stack_size is not yet available, don't use FakeStack. 216 fake_stack_ = FakeStack::Create(stack_size_log); 520 t->StartSwitchFiber((FakeStack**)fakestacksave, (uptr)bottom, size); 532 t->FinishSwitchFiber((FakeStack*)fakestack,
|
/netbsd-current/external/apache2/llvm/dist/llvm/lib/Transforms/Instrumentation/ |
H A D | AddressSanitizer.cpp | 3306 Value *FakeStack; 3314 // void *FakeStack = __asan_option_detect_stack_use_after_return 3317 // void *LocalStackBase = (FakeStack) ? FakeStack : alloca(LocalStackSize); 3332 FakeStack = createPHI(IRB, UseAfterReturnIsEnabled, FakeStackValue, Term, 3336 IRB.CreateICmpEQ(FakeStack, Constant::getNullValue(IntptrTy)); 3343 LocalStackBase = createPHI(IRB, NoFakeStack, AllocaValue, Term, FakeStack); 3347 // void *FakeStack = nullptr; 3349 FakeStack = ConstantInt::get(IntptrTy, 0); 3434 // if FakeStack ! [all...] |