[PATCH] D29586: [lsan] Enable LSan for arm Linux

Adhemerval Zanella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 10:17:32 PST 2017


zatrazz added a comment.

In https://reviews.llvm.org/D29586#672507, @m.ostapenko wrote:

> In https://reviews.llvm.org/D29586#672380, @zatrazz wrote:
>
> > In https://reviews.llvm.org/D29586#672157, @m.ostapenko wrote:
> >
> > > So, it seems that LSan's operability depends on what compiler is used to build it :(.
> >
> >
> > It is a know issue [1] [2] and in fact it a little more complicated, it depends on the flags used as well:
> >
> >   if you mix thumb and arm code fast unwinder won't work. I am not sure which option would be better, 
> >
> > but I am afraid to get a reliable stacktrack on arm (with mixed objects and function built with different compilers)
> >  we will need to use a external unwinder (maybe libunwinder). But it will have the side-effect of making 
> >  backtrace way slower.
> >
> > [1] https://llvm.org/bugs/show_bug.cgi?id=22741
> >  [2] https://llvm.org/bugs/show_bug.cgi?id=18505
>
>
> Right, but I thought it affects only Thumb (that might be mixed with arm) but it seems that even arm mode is affected depending on GCC version. This complicates enabling tests on arm targets, but still, It would be nice to have LSan available on arm.


My only concern is what kind of information user will see when potentially use with different libraries and systems.
We can constrain testing on a working environment, but it does not help when real usercase won't get meaningful
stacktraces.

Other projects usually rely on dwarf CFI for get arm stacktraces (valgrind, glibc) and I think we might need to actually
use it or rely on external libraries for arm (libunwind, etc.). Valgrind even tries to add some instructions scanning
to get around the thumb issues (coregrind/m_stacktrace.c) but it even states that it results in bad output.

One option would be to enable lsan as is and try to improve sanitizer stacktrace on arm
(lib/sanitizer_common/sanitizer_stacktrace.cc).


Repository:
  rL LLVM

https://reviews.llvm.org/D29586





More information about the llvm-commits mailing list