[llvm-commits] [compiler-rt] r152347 - /compiler-rt/trunk/lib/asan/asan_stack.cc
Kostya Serebryany
kcc at google.com
Thu Mar 8 14:25:08 PST 2012
Author: kcc
Date: Thu Mar 8 16:25:08 2012
New Revision: 152347
URL: http://llvm.org/viewvc/llvm-project?rev=152347&view=rev
Log:
[asan]: fix off-by-one error in stack unwinder (asan issue #44; reproduced thanks to 'csmith' fuzzer)
Modified:
compiler-rt/trunk/lib/asan/asan_stack.cc
Modified: compiler-rt/trunk/lib/asan/asan_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_stack.cc?rev=152347&r1=152346&r2=152347&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_stack.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_stack.cc Thu Mar 8 16:25:08 2012
@@ -69,7 +69,7 @@
uintptr_t *top = (uintptr_t*)t->stack_top();
uintptr_t *bottom = (uintptr_t*)t->stack_bottom();
while (frame >= prev_frame &&
- frame < top &&
+ frame < top - 2 &&
frame > bottom &&
size < max_size) {
uintptr_t pc1 = frame[1];
More information about the llvm-commits
mailing list