Re: pgsql: Initialize unused ExprEvalStep fields. - Mailing list pgsql-committers

From Andres Freund
Subject Re: pgsql: Initialize unused ExprEvalStep fields.
Date
Msg-id 20180129203303.bsln3mc3n4ojcc33@alap3.anarazel.de
Whole thread Raw
In response to Re: pgsql: Initialize unused ExprEvalStep fields.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
Hi,

On 2018-01-29 15:16:59 -0500, Tom Lane wrote:
> > Also zero-initialize all scratch ExprEvalStep's allocated on the
> > stack, to avoid issues with similar future omissions of non-critial
> > data.
> 
> Dunno that that's a good idea; it will also serve to hide valid warnings.

Possible, but I think it's more likely that new fields with default to
zero/NULL anyway. Zero initializing around allocations is a pretty
common thing in the PG codebase, so it does feel consistent to me.

Greetings,

Andres Freund


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Introduce ExecQualAndReset() helper.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Add some noreturn attributes to help static analyzers