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

From Tom Lane
Subject Re: pgsql: Initialize unused ExprEvalStep fields.
Date
Msg-id 32346.1517257019@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Initialize unused ExprEvalStep fields.  (Andres Freund <andres@anarazel.de>)
Responses Re: pgsql: Initialize unused ExprEvalStep fields.
List pgsql-committers
Andres Freund <andres@anarazel.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


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Save a few bytes by removing useless last argument toSearchCatC
Next
From: Andres Freund
Date:
Subject: pgsql: Introduce ExecQualAndReset() helper.