[PATCH] D27143: Fix detection of backtrace() availability on FreeBSD

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 09:41:05 PDT 2017


arichardson added a comment.

I noticed that the backtraces are not particularly useful on FreeBSD, they always look like this (even when I disable sigaltstack()):

  #0 0x000000080183d35c llvm::sys::PrintStackTrace(llvm::raw_ostream&) /exports/users/alr48/sources/llvm-upstream/lib/Support/Unix/Signals.inc:399:11
  #1 0x000000080183d799 PrintStackTraceSignalHandler(void*) /exports/users/alr48/sources/llvm-upstream/lib/Support/Unix/Signals.inc:463:1
  #2 0x000000080183a797 llvm::sys::RunSignalHandlers(void) /exports/users/alr48/sources/llvm-upstream/lib/Support/Signals.cpp:45:5
  #3 0x000000080183da0a SignalHandler(int) /exports/users/alr48/sources/llvm-upstream/lib/Support/Unix/Signals.inc:253:1
  #4 0x0000000801aa778f (/lib/libthr.so.3+0xe78f)
  #5 0x0000000801aa6d6f (/lib/libthr.so.3+0xdd6f)

I hacked around this issue by printing the stacktrace prior to calling abort but there must be a better solution.


https://reviews.llvm.org/D27143





More information about the llvm-commits mailing list