[asan]: fix off-by-one error in stack unwinder (asan issue #44; reproduced thanks to 'csmith' fuzzer)

llvm-svn: 152347
This commit is contained in:
Kostya Serebryany 2012-03-08 22:25:08 +00:00
parent 3bc40c5fee
commit f7fc1d4859
1 changed files with 1 additions and 1 deletions

View File

@ -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];