Hi,

On 2026-10-03 19:07:02 -0400, Andres Freund wrote:
> On October 3, 2026 5:03:27 PM EDT, Andres Freund <[email protected]> wrote:
> >I think there are definitely some bugs in lcov around multi-line statements
> >that contain branches. That's where it seems to very often get confused and
> >claims the data is inconsistent, but afaict it's due to it misunderstanding
> >the data that gcov spits out.  I'll try to make a bug report out of that.
> 
> Oh, huh. At least one of the two bugs is actually a behavioral difference 
> between gcc versions, not lcov versions. The gcov data starting with gcc 15 
> reports
> 
> var =
>    cond ? a : b;
> 
> i.e. a variable assignment with a conditional in a new line, different than 
> before. And the new output actually triggers errors in lcov back to at least 
> lcov 2.0. It's actually an error in geninfo.
> 
> I found another small repro for multi line conditionals where some branches 
> are never reached triggering errors in lcov itself, and that one is not gcc 
> version dependent...
> 
> Will report bugs later today or tomorrow, food is more important now.

Bug triggering at least with lcov >= 2.0:
  https://github.com/linux-test-project/lcov/issues/554

At first I though this was only reachable with gcc 15, but with some LLM help
I found a version that triggered down to gcc 12.


Bug triggering with lcov >= 2.2:
   https://github.com/linux-test-project/lcov/issues/555

this seems independent of the gcc version.


It's kinda interesting that both only trigger for multi-line statements.
Which may be related to why we're seeing them more - we use more multi-line
statements than we used to.

Greetings,

Andres Freund


Reply via email to