r300295 - [docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 13 19:18:13 PDT 2017


Does anyone know what it would take to get the slow unwinder to work on Darwin?

thanks,
vedant

> On Apr 13, 2017, at 6:59 PM, Vedant Kumar via cfe-commits <cfe-commits at lists.llvm.org> wrote:
> 
> Author: vedantk
> Date: Thu Apr 13 20:59:44 2017
> New Revision: 300295
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=300295&view=rev
> Log:
> [docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin
> 
> Printing out stack traces along with UBSan diagnostics is unsupported on
> Darwin. That's because it isn't possible to use the fast unwinder or the
> slow unwinder.
> 
> Apparently, it's inappropriate to use the fast unwinder for UBSan
> issues. I'm not exactly sure why (see the comment in ubsan_diag.cc).
> Forcing use of the fast unwinder produces decent results, AFAICT.
> 
> Darwin also does not appear to have a slow unwinder suitable for use
> with the sanitizers. Apparently that's because of PR20800 [1][2]. But
> that bug has been fixed. I'm not sure if there is anything preventing
> use of the slow unwinder now.
> 
> Currently, passing UBSAN_OPTIONS=print_stacktrace=1 does nothing on
> Darwin. This isn't good, but it might be a while before we can fix the
> situation, so we should at least document it.
> 
> [1] https://github.com/google/sanitizers/issues/137
> "We can't use the slow unwinder on OSX now, because Clang produces
> incorrect unwind info for the ASan runtime functions on OSX
> (http://llvm.org/PR20800)."
> 
> [2] https://bugs.llvm.org/show_bug.cgi?id=20800
> Bug 20800 - Invalid compact unwind info generated for a function without
> frame pointers on OSX
> 
> Modified:
>    cfe/trunk/docs/UndefinedBehaviorSanitizer.rst
> 
> Modified: cfe/trunk/docs/UndefinedBehaviorSanitizer.rst
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/UndefinedBehaviorSanitizer.rst?rev=300295&r1=300294&r2=300295&view=diff
> ==============================================================================
> --- cfe/trunk/docs/UndefinedBehaviorSanitizer.rst (original)
> +++ cfe/trunk/docs/UndefinedBehaviorSanitizer.rst Thu Apr 13 20:59:44 2017
> @@ -157,6 +157,8 @@ will need to:
>    ``UBSAN_OPTIONS=print_stacktrace=1``.
> #. Make sure ``llvm-symbolizer`` binary is in ``PATH``.
> 
> +Stacktrace printing for UBSan issues is currently not supported on Darwin.
> +
> Issue Suppression
> =================
> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list