[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:
Alexander Potapenko 2012-11-15 14:59:19 +00:00
parent 5669218d7a
commit 93dcc8d2bd
1 changed files with 5 additions and 2 deletions

View File

@ -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) ||