Re: -Wanalyzer-malloc-leak false positives

2023-03-29 Thread Alejandro Colomar via Gcc
On 3/29/23 15:41, Alejandro Colomar wrote: >>> Should I report this in bugzilla? >> Yes please. > Will do. > >> Please can you attach the preprocessed source [1] to the >> bug report(s) so that we're looking at the same code. Reported: -- <

Re: -Wanalyzer-malloc-leak false positives

2023-03-29 Thread Alejandro Colomar via Gcc
Hi David, On 3/29/23 15:32, David Malcolm wrote: >> $ cat pass.c >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> > > [...snip...] > > I very briefly tried to reproduce this myself, but I suspect we've got > different headers. I'm on Debian Sid with

Re: -Wanalyzer-malloc-leak false positives

2023-03-29 Thread David Malcolm via Gcc
On Wed, 2023-03-29 at 15:20 +0200, Alejandro Colomar via Gcc wrote: > Hi! > > With both GCC 12.2.0 (Debian), and GCC 13.0.1 20230315 (built from > source), > I can reproduce these false positives. > > The reproducer program is a small program that checks a password > against a > hardcoded string,

-Wanalyzer-malloc-leak false positives

2023-03-29 Thread Alejandro Colomar via Gcc
Hi! With both GCC 12.2.0 (Debian), and GCC 13.0.1 20230315 (built from source), I can reproduce these false positives. The reproducer program is a small program that checks a password against a hardcoded string, and conditionally prints "validated". I wrote it precisely to demonstrate how [[gnu: