Re: Coverage with make coverage-html is broken on latest Debian using lcov v2

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Narek Galstyan <narek(dot)galstyan(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org, "narekg(at)berkeley(dot)edu" <narekg(at)berkeley(dot)edu>, ngalstyan4(at)gmail(dot)com
Subject: Re: Coverage with make coverage-html is broken on latest Debian using lcov v2
Date: 2026-10-03 23:07:02
Message-ID: AA39D6AA-7A22-4A3E-8BD2-4E2D64EDB9BE@anarazel.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On October 3, 2026 5:03:27 PM EDT, Andres Freund <andres(at)anarazel(dot)de> 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.

Greetings,

Andres
--
Sent from my phone. Please excuse my brevity.

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Manu 2026-10-03 22:46:05 Re: Proposal: "query_work_mem" GUC, to distribute working memory to the query's individual operators