[PATCH] D31430: Disable asan leak tests on i386 linux

Maxim Ostapenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 01:59:39 PDT 2017


m.ostapenko added a comment.

In https://reviews.llvm.org/D31430#712412, @fjricci wrote:

> In https://reviews.llvm.org/D31430#712410, @m.ostapenko wrote:
>
> > In https://reviews.llvm.org/D31430#712387, @fjricci wrote:
> >
> > > Well, the issue is that currently, we aren't respecting the default flags as set in `sanitizer_flags.inc` when we run on asan. `asan_flags.cc` overrides the defaults and replaces them with `CAN_SANITIZE_LEAKS`. This means that leak checking will always run on asan builds, even when the default is set to disabled. This isn't causing issues for linux-i386, as most of the tests pass even though it's technically supposed to be disabled. However, for Darwin, the tests will all fail, so we need to ensure that the default values are respected.
> >
> >
> > So why not make LSan on Darwin pass these tests instead of disabling them on Linux?
>
>
> Because it hasn't been fully implemented yet, and we want build-only coverage to ensure that nobody breaks the build in the meantime.
>
> > 
> > 
> >> When the defaults are respected, asan will not have leak detection by default on linux-i386, which means that asan tests requiring `leak-detection` will fail.
> > 
> > Why would we want to disable LSan on x86 Linux by default? It would lead to inconsistency with other architectures default value that may confuse users.
>
> All x86 builds for lsan are currently disabled by default, due to the very high false-negative rate (I believe that patch blames to you actually).


True, but during enabling LSan on x86 Linux (during review) it was decided to make it on by default. And it's simply wrong to disable tests on Linux just for enabling build on Darwin.
Can't you just modify `detect_leaks` default value to be **off** on Darwin and **on** on Linux?


https://reviews.llvm.org/D31430





More information about the llvm-commits mailing list