Re: pgsql: Initialize unused ExprEvalStep fields.

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Initialize unused ExprEvalStep fields.
Date: 2018-01-29 20:33:03
Message-ID: 20180129203303.bsln3mc3n4ojcc33@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2018-01-30 01:48:14 pgsql: Add some noreturn attributes to help static analyzers
Previous Message Andres Freund 2018-01-29 20:23:28 pgsql: Introduce ExecQualAndReset() helper.