[llvm-commits] [compiler-rt] r168043 - /compiler-rt/trunk/lib/asan/asan_thread.cc
Alexander Potapenko
glider at google.com
Thu Nov 15 06:59:19 PST 2012
Author: glider
Date: Thu Nov 15 08:59:19 2012
New Revision: 168043
URL: http://llvm.org/viewvc/llvm-project?rev=168043&view=rev
Log:
[ASan] Minor fix: return to the last byte of the fake stack if we've raced by.
Modified:
compiler-rt/trunk/lib/asan/asan_thread.cc
Modified: compiler-rt/trunk/lib/asan/asan_thread.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_thread.cc?rev=168043&r1=168042&r2=168043&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_thread.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_thread.cc Thu Nov 15 08:59:19 2012
@@ -143,8 +143,11 @@
}
if (shadow_ptr < shadow_bottom) {
- *offset = 0;
- return "UNKNOWN";
+ // 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));
More information about the llvm-commits
mailing list