Re: pgsql: Initialize unused ExprEvalStep fields.

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

Andres Freund <andres(at)anarazel(dot)de> writes:
> Initialize unused ExprEvalStep fields.
> ExecPushExprSlots didn't initialize ExprEvalStep's resvalue/resnull
> steps as it didn't use them. That caused wrong valgrind warnings for
> an upcoming patch, so zero-intialize.

Check ...

> 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.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2018-01-29 20:23:28 pgsql: Introduce ExecQualAndReset() helper.
Previous Message Tom Lane 2018-01-29 20:13:30 pgsql: Save a few bytes by removing useless last argument to SearchCatC