From 6db8ad43df013f10234ddcafc5b3fd46967a5d64 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Tue, 20 Nov 2012 15:15:44 +0000 Subject: [PATCH] [asan] pop the two internal functions from the stack trace produced by _Unwind_Backtrace (Peter Bergner) llvm-svn: 168369 --- compiler-rt/lib/asan/asan_linux.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/lib/asan/asan_linux.cc b/compiler-rt/lib/asan/asan_linux.cc index 740bf5e..2e6934e 100644 --- a/compiler-rt/lib/asan/asan_linux.cc +++ b/compiler-rt/lib/asan/asan_linux.cc @@ -160,6 +160,8 @@ void GetStackTrace(StackTrace *stack, uptr max_s, uptr pc, uptr bp) { stack->max_size = max_s; #if defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__) _Unwind_Backtrace(Unwind_Trace, stack); + // Pop off the two ASAN functions from the backtrace. + stack->PopStackFrames(2); #else if (!asan_inited) return; if (AsanThread *t = asanThreadRegistry().GetCurrent()) -- 2.7.4