[asan] pop the two internal functions from the stack trace produced by _Unwind_Backtr...
authorKostya Serebryany <kcc@google.com>
Tue, 20 Nov 2012 15:15:44 +0000 (15:15 +0000)
committerKostya Serebryany <kcc@google.com>
Tue, 20 Nov 2012 15:15:44 +0000 (15:15 +0000)
llvm-svn: 168369

compiler-rt/lib/asan/asan_linux.cc

index 740bf5e..2e6934e 100644 (file)
@@ -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())