Re: ecpg assertion on windows

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: ecpg assertion on windows
Date: 2022-08-24 15:16:41
Message-ID: 20220824151641.vv2x2puyrczcxkkc@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-08-24 00:32:53 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2022-08-24 00:18:27 -0400, Tom Lane wrote:
> >> But if the regression tests are triggering use of uninitialized values, how
> >> could we have failed to detect that? Either valgrind or unstable behavior
> >> should have found this ages ago.
>
> > I think it's just different criteria for when to report issues. Valgrind
> > reports uninitialized memory only when there's a conditional branch depending
> > on it or such. Whereas this seems to trigger when passing an uninitialized
> > value to a function by value, even if it's then not relied upon.
>
> If the value is not actually relied on, then it's a false positive.

My understanding is that formally speaking passing an undefined value by value
to a function is "relying on it" and undefined behaviour. Hard to believe
it'll cause any compiler go haywire and eat the computer, but ...

> I don't say we shouldn't fix it, because we routinely jump through
> hoops to silence various sorts of functionally-harmless warnings.
> But let's be clear about whether there's a real bug here.

Yea.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-08-24 15:25:31 Re: Extending outfuncs support to utility statements
Previous Message Dave Page 2022-08-24 15:15:47 Re: Tracking last scan time