[compiler-rt] r241261 - [sanitizer] add #ifdefs around slow unwinder to fix OS X debug build

Kuba Brecka kuba.brecka at gmail.com
Thu Jul 2 06:56:38 PDT 2015


Author: kuba.brecka
Date: Thu Jul  2 08:56:37 2015
New Revision: 241261

URL: http://llvm.org/viewvc/llvm-project?rev=241261&view=rev
Log:
[sanitizer] add #ifdefs around slow unwinder to fix OS X debug build

A recent change in slow unwinder causes the OS X build to fail when using COMPILER_RT_DEBUG=On. Let's fix this by #ifdef'ing it with #if SANITIZER_CAN_SLOW_UNWIND.

See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150622/284294.html

Reviewed at http://reviews.llvm.org/D10870


Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc?rev=241261&r1=241260&r2=241261&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc Thu Jul  2 08:56:37 2015
@@ -60,10 +60,14 @@ void BufferedStackTrace::Unwind(u32 max_
     return;
   }
   if (!WillUseFastUnwind(request_fast_unwind)) {
+#if SANITIZER_CAN_SLOW_UNWIND
     if (context)
       SlowUnwindStackWithContext(pc, context, max_depth);
     else
       SlowUnwindStack(pc, max_depth);
+#else
+    UNREACHABLE("slow unwind requested but not available");
+#endif
   } else {
     FastUnwindStack(pc, bp, stack_top, stack_bottom, max_depth);
   }





More information about the llvm-commits mailing list