diff options
author | Kostya Serebryany <kcc@google.com> | 2012-03-08 22:25:08 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-03-08 22:25:08 +0000 |
commit | 40928f1ec8a8f43464a83b416f75fbe89f21f753 (patch) | |
tree | 38930183a338241a6686a872e8b232f9f172b7c5 /lib/asan/asan_stack.cc | |
parent | 50f9b8f8d1d9ac33d4bfca9fb2315f1265d957d3 (diff) |
[asan]: fix off-by-one error in stack unwinder (asan issue #44; reproduced thanks to 'csmith' fuzzer)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_stack.cc')
-rw-r--r-- | lib/asan/asan_stack.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asan/asan_stack.cc b/lib/asan/asan_stack.cc index 5dabc04a6..c3bca8054 100644 --- a/lib/asan/asan_stack.cc +++ b/lib/asan/asan_stack.cc @@ -69,7 +69,7 @@ void AsanStackTrace::FastUnwindStack(uintptr_t pc, uintptr_t bp) { 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]; |