forked from OSchip/llvm-project
[asan] don't lazy-init fake_stack if we only need to check that fake_stack exists (should fix 32-bit builds)
llvm-svn: 190593
This commit is contained in:
parent
628cda7367
commit
736bd08e05
|
@ -187,7 +187,7 @@ const char *AsanThread::GetFrameNameByAddr(uptr addr, uptr *offset,
|
|||
uptr bottom = 0;
|
||||
if (AddrIsInStack(addr)) {
|
||||
bottom = stack_bottom();
|
||||
} else if (fake_stack()) {
|
||||
} else if (has_fake_stack()) {
|
||||
bottom = fake_stack()->AddrIsInFakeStack(addr);
|
||||
CHECK(bottom);
|
||||
*offset = addr - bottom;
|
||||
|
|
|
@ -81,8 +81,12 @@ class AsanThread {
|
|||
fake_stack_->Destroy();
|
||||
}
|
||||
|
||||
bool has_fake_stack() {
|
||||
return (reinterpret_cast<uptr>(fake_stack_) > 1);
|
||||
}
|
||||
|
||||
FakeStack *fake_stack() {
|
||||
if (reinterpret_cast<uptr>(fake_stack_) <= 1)
|
||||
if (!has_fake_stack())
|
||||
return AsyncSignalSafeLazyInitFakeStack();
|
||||
return fake_stack_;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue