summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2014-07-10 09:11:15 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2014-07-10 09:11:15 +0000
commit794d4dde4892b42a6e5f56c2775489d31876a448 (patch)
tree6b8c92f09eeb2cbb650f6cef89557214847975e0
parentd0907ae222f11fff4b6f7e8c4e0f1601b41e6bba (diff)
downloadbcm5719-llvm-794d4dde4892b42a6e5f56c2775489d31876a448.tar.gz
bcm5719-llvm-794d4dde4892b42a6e5f56c2775489d31876a448.zip
Only use fast stack unwinding for sanitizers failure reports on FreeBSD
Differential Revision: http://reviews.llvm.org/D4420 llvm-svn: 212691
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
index c3ba193f45d..fcaa777ccee 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
@@ -52,9 +52,12 @@ struct StackTrace {
static bool WillUseFastUnwind(bool request_fast_unwind) {
// Check if fast unwind is available. Fast unwind is the only option on Mac.
+ // It is also the only option on FreeBSD as the slow unwinding that
+ // leverages _Unwind_Backtrace() yields the call stack of the signal's
+ // handler and not of the code that raised the signal (as it does on Linux).
if (!SANITIZER_CAN_FAST_UNWIND)
return false;
- else if (SANITIZER_MAC)
+ else if (SANITIZER_MAC != 0 || SANITIZER_FREEBSD != 0)
return true;
return request_fast_unwind;
}
OpenPOWER on IntegriCloud