Re: Is SANITIZE=leak make test unreliable for anyone else?
- From
Jeff King <peff@peff.net>
- Date
- Oct 4, 2023, 13:21 UTC
- Message-ID
- <20231004132132.GC607079@coredump.intra.peff.net>
- In-Reply-To
- <878r8j2mu1.fsf@email.froward.int.ebiederm.org>
On Tue, Oct 03, 2023 at 08:33:26PM -0500, Eric W. Biederman wrote:
Show 5 quoted lines
> My big question is: > > Do other people see random test failures when SANITIZE=leak is enabled? > > Is it just me?
Yes, I've seen this. You mentioned that you were testing with v2.42, which lacks 370ef7e40d (test-lib: ignore uninteresting LSan output, 2023-08-28). Try using the current version of 'master', or just cherry-picking that commit onto v2.42.
A few other tips to avoid confusing results (though they at least do not vary from run to run):
- use the LEAK_LOG option, since you otherwise miss some cases (it
looks like you already are from what you posted above) - gcc and clang sometimes produce different results. Right now I get
no leak from gcc on t9004, but clang reports one (I think clang is
right here) - turn off compiler optimizations; we've had cases where code
reordering/removal creates false positives. Oh, hmm, I forgot we do
this by default since d3775de074 (Makefile: force -O0 when compiling
with SANITIZE=leak, 2022-10-18), so your v2.42 should be covered.-Peff