Re: ecpg assertion on windows - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ecpg assertion on windows
Date
Msg-id 899515.1661314707@sss.pgh.pa.us
Whole thread Raw
In response to Re: ecpg assertion on windows  (Andres Freund <andres@anarazel.de>)
Responses Re: ecpg assertion on windows
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2022-08-23 20:36:55 -0700, Andres Freund wrote:
>> Running the ecpg regression tests interactively (to try to find a different
>> issue), triggered a crash on windows due to an uninitialized variable (after
>> pressing "ignore" in that stupid gui window that we've only disabled for the
>> backend).
>> "The variable 'replace_val' is being used without being initialized."

> Looks to me like that's justified.

Hmm ... that message sounded like it is a run-time detection not from
static analysis.  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.

Seeing that replace_val is a union of differently-sized types,
I was wondering if this message is a false positive based on
struct assignment transferring a few uninitialized bytes, or
something like that.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: SQL/JSON features for v15
Next
From: Andres Freund
Date:
Subject: Re: ecpg assertion on windows