[PATCH] D18895: [sanitizer] [SystemZ] Fix stack traces.

Marcin Koƛcielnicki via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 14:36:34 PDT 2016


koriakin added a comment.

In http://reviews.llvm.org/D18895#401765, @uweigand wrote:

> In http://reviews.llvm.org/D18895#401756, @koriakin wrote:
>
> > @uweigand I have committed this as-is, but what do you think about the backchain issue? Should we prioritize adding -mbackchain support before ASan, or just XFAIL these tests?
>
>
> Just adding -mbackchain isn't going to help much, since on all current SystemZ Linux distros the whole system -including all libraries- is built without backchain, so you'll always run into code without backchain.


We can make -fsanitize=whatever force -mbackchain though (it's already done for -fno-omit-frame-pointer), which makes the main app traceable, plus add the flag to sanitizer build, which is all that really matters.  And mixing non-sanitized libraries is quite sketchy for MSan and TSan either way...

> Generally, the only safe way to unwind the stack is via DWARF CFI; we always default to -fasynchronous-unwind-tables, so .eh_frame should always have good CFI.


That is true, and it works in general - but IIRC one of the failing tests checks unwinding through a library that's already unloaded (it prints the stack trace of whatever allocated the problematic memory area, I forgot how it works exactly...).  I'll take a closer look at why the fast unwinder is used in the other tests (this patch fixed 10 or so of them).


Repository:
  rL LLVM

http://reviews.llvm.org/D18895





More information about the llvm-commits mailing list