Searched refs:FakeStack (Results 1 - 6 of 6) sorted by relevance

/external/compiler-rt/lib/asan/tests/
H A Dasan_fake_stack_test.cc12 // 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...]
/external/compiler-rt/lib/asan/
H A Dasan_fake_stack.cc12 // 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 Dasan_fake_stack.h12 // 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 Dasan_thread.h90 FakeStack *t = fake_stack_;
96 void StartSwitchFiber(FakeStack **fake_stack_save, uptr bottom, uptr size);
97 void FinishSwitchFiber(FakeStack *fake_stack_save);
104 FakeStack *fake_stack() {
132 FakeStack *AsyncSignalSafeLazyInitFakeStack();
156 FakeStack *fake_stack_;
H A Dasan_thread.cc123 void AsanThread::StartSwitchFiber(FakeStack **fake_stack_save, uptr bottom,
134 FakeStack *current_fake_stack = fake_stack_;
144 void AsanThread::FinishSwitchFiber(FakeStack *fake_stack_save) {
188 // We want to create the FakeStack lazyly on the first use, but not eralier
190 FakeStack *AsanThread::AsyncSignalSafeLazyInitFakeStack() {
192 if (stack_size == 0) // stack_size is not yet available, don't use FakeStack.
210 fake_stack_ = FakeStack::Create(stack_size_log);
446 t->StartSwitchFiber((FakeStack**)fakestacksave, (uptr)bottom, size);
456 t->FinishSwitchFiber((FakeStack*)fakestack);
/external/llvm/lib/Transforms/Instrumentation/
H A DAddressSanitizer.cpp2101 Value *FakeStack; local
2105 // void *FakeStack = __asan_option_detect_stack_use_after_return
2108 // void *LocalStackBase = (FakeStack) ? FakeStack : alloca(LocalStackSize);
2125 FakeStack = createPHI(IRB, UseAfterReturnIsEnabled, FakeStackValue, Term,
2129 IRB.CreateICmpEQ(FakeStack, Constant::getNullValue(IntptrTy));
2137 LocalStackBase = createPHI(IRB, NoFakeStack, AllocaValue, Term, FakeStack);
2139 // void *FakeStack = nullptr;
2141 FakeStack = ConstantInt::get(IntptrTy, 0);
2200 // if FakeStack !
[all...]

Completed in 184 milliseconds