[llvm-dev] Sanitizers + New Pass Manager

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Wed May 13 12:39:01 PDT 2020


+some sanitizer/new pass manager folks



On Wed, May 13, 2020 at 12:22 PM Arthur Eubanks via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi,
>
> I've been trying to burn down the remaining sanitizer failures under the
> new pass manager. Right now I'm stuck on some ASan tests.
>
> Some ASan tests run under -O1. There are a couple differences between the
> old and new pass managers under -O1, e.g. the old PM doesn't inline whereas
> the new PM does. The differences seem to cause some lifetime intrinsics to
> get stripped out (e.g. via SROA, InstCombine). It might be due to ASan
> specifically testing undefined behavior, and different optimizations run
> means different behavior. For a specific example,
> use-after-scope-dtor-order.cpp runs under -O1 and fails under the new PM
> because SROA strips out the lifetime intrinsics and by the time the ASan
> pass runs it doesn't find the lifetime intrinsics to add its own
> instrumentation.
>

That, to me, sounds like a real bug in the optimizations/asan
implementation if this choice fo optimizations makes the diagnosis go away.
(is ASan able to diagnose the problem at -O3 (where I guess SROA and other
things run) with the legacy pass manager?)


>
> What's the proper way to resolve this? Run the tests under -O0? Change the
> passes pipeline under the new PM when ASan (and maybe other sanitizers) is
> detected?
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200513/cde74683/attachment.html>


More information about the llvm-dev mailing list