[compiler-rt] r212691 - Only use fast stack unwinding for sanitizers failure reports on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Thu Jul 10 02:11:16 PDT 2014
Author: vkutuzov
Date: Thu Jul 10 04:11:15 2014
New Revision: 212691
URL: http://llvm.org/viewvc/llvm-project?rev=212691&view=rev
Log:
Only use fast stack unwinding for sanitizers failure reports on FreeBSD
Differential Revision: http://reviews.llvm.org/D4420
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h?rev=212691&r1=212690&r2=212691&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h Thu Jul 10 04:11:15 2014
@@ -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;
}
More information about the llvm-commits
mailing list