Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions compiler-rt/lib/asan/asan_fake_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,25 @@ static FakeStack* GetFakeStack() {
}

static FakeStack* GetFakeStackFast() {
if (FakeStack* fs = GetTLSFakeStack())
FakeStack* fs = GetTLSFakeStack();
if (LIKELY(fs))
return fs;
if (!__asan_option_detect_stack_use_after_return)
return nullptr;
return GetFakeStack();
fs = GetFakeStack();
if (LIKELY(fs))
SetTLSFakeStack(fs);
return fs;
}

static FakeStack* GetFakeStackFastAlways() {
if (FakeStack* fs = GetTLSFakeStack())
FakeStack* fs = GetTLSFakeStack();
if (LIKELY(fs))
return fs;
return GetFakeStack();
fs = GetFakeStack();
if (LIKELY(fs))
SetTLSFakeStack(fs);
return fs;
}

static ALWAYS_INLINE uptr OnMalloc(uptr class_id, uptr size) {
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/asan/asan_fake_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class FakeStack {
void *true_start;
};

void SetTLSFakeStack(FakeStack *fs);
void SetTLSFakeStack(FakeStack* fs);

} // namespace __asan

Expand Down
Loading