[PATCH] [PowerPC]Adapt fast stack unwinding to work for Power.

Bill Seurer seurer at linux.vnet.ibm.com
Tue Jun 23 13:40:58 PDT 2015


Bill Schmidt had me try something: disable the stack popping in the slow unwinder for power to see what the popping code really does.  Note that the unwanted function __asan::GetStackTraceWithPcBpAndContext appears in both slow and fast unwinders.  So whatever is causing it to appear has been there all along and is already compensated for in the slow unwinder.

This is the stack for operator new *without popping* with the slow unwinder.  Note that normally (i.e., with popping) the top 3 frames are removed.

  #0 0x100ff688 in

__sanitizer::BufferedStackTrace::SlowUnwindStack(unsigned long, unsigned
int)
/home/seurer/llvm/llvm-test/projects/compiler-rt/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc:116

  #1 0x100fc684 in __sanitizer::BufferedStackTrace::Unwind(unsigned

int, unsigned long, unsigned long, void*, unsigned long, unsigned long,
bool)
/home/seurer/llvm/llvm-test/projects/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc:66

  #2 0x10104748 in

__asan::GetStackTraceWithPcBpAndContext(__sanitizer::BufferedStackTrace*, unsigned
long, unsigned long, unsigned long, void*, bool)
/home/seurer/llvm/llvm-test/projects/compiler-rt/lib/asan/asan_stack.h:50

  #3 0x10104748 in operator new(unsigned long)

/home/seurer/llvm/llvm-test/projects/compiler-rt/lib/asan/asan_new_delete.cc:62

  #4 0x10107c30 in main /home/seurer/test/stack/crash-small.cpp:11:8
  #5 0x3fff93b84dfc  (/lib/powerpc64le-linux-gnu/libc.so.6+0x24dfc)

And here it is *without popping* with the fast unwinder.

  #0 0x10104768 in

__asan::GetStackTraceWithPcBpAndContext(__sanitizer::BufferedStackTrace*, unsigned
long, unsigned long, unsigned long, void*, bool)
/home/seurer/llvm/llvm-test/projects/compiler-rt/lib/asan/asan_stack.h:50

  #1 0x10104768 in operator new(unsigned long)

/home/seurer/llvm/llvm-test/projects/compiler-rt/lib/asan/asan_new_delete.cc:62

  #2 0x10107c50 in main /home/seurer/test/stack/crash-small.cpp:11:8
  #3 0x3fff97ba4dfc  (/lib/powerpc64le-linux-gnu/libc.so.6+0x24dfc)
  #4 0x3fff97ba4ff0 in __libc_start_main

(/lib/powerpc64le-linux-gnu/libc.so.6+0x24ff0)

The same thing happens with the other functions, too.


http://reviews.llvm.org/D9259

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list