[llvm-dev] [Sanitizers] Platforms that don't support stack unwinding

Julian Lettner via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 25 11:29:48 PST 2019


Hi,

In sanitizer code we have two notions of stack unwinders: fast and slow. [1] In the context of sanitizers, stack unwinding is most often for printing error reports that include a stack trace.

I am currently trying to fix an issue that is related to some platforms (Darwin) only supporting the fast unwinder, but calling code not being aware of that possibility.
My mental model was that platforms are required to at least support one kind of unwinder, so I turned a runtime check [2] into a compile time assert [3]. Apparently this is not the case.

What do (or should) we do on platforms without supported unwinders? 
Or is my mental model correct, and this a runtime (instead of compile time) check for other reasons? Compilation/build system convenience?

Thanks,
Julian

[1] https://github.com/llvm/llvm-project/blob/fcbd7f64953b04f42dd59f606e45dc8e88a27548/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h#L21 <https://github.com/llvm/llvm-project/blob/fcbd7f64953b04f42dd59f606e45dc8e88a27548/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h#L21>
[2] https://github.com/llvm/llvm-project/blob/fcbd7f64953b04f42dd59f606e45dc8e88a27548/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc#L78 <https://github.com/llvm/llvm-project/blob/fcbd7f64953b04f42dd59f606e45dc8e88a27548/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc#L78>
[3] https://github.com/llvm/llvm-project/blob/fcbd7f64953b04f42dd59f606e45dc8e88a27548/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h#L21

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190225/32341fab/attachment.html>


More information about the llvm-dev mailing list