[ASan] Minor fix: return to the last byte of the fake stack if we've raced by.
llvm-svn: 168043
This commit is contained in:
parent
5669218d7a
commit
93dcc8d2bd
|
@ -143,9 +143,12 @@ const char *AsanThread::GetFrameNameByAddr(uptr addr, uptr *offset) {
|
|||
}
|
||||
|
||||
if (shadow_ptr < shadow_bottom) {
|
||||
// If we're one byte below the fake stack bottom, we've found the frame.
|
||||
if (!is_fake_stack || (*shadow_bottom != kAsanStackAfterReturnLeftMagic)) {
|
||||
*offset = 0;
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
uptr* ptr = (uptr*)SHADOW_TO_MEM((uptr)(shadow_ptr + 1));
|
||||
CHECK((ptr[0] == kCurrentStackFrameMagic) ||
|
||||
|
|
Loading…
Reference in New Issue