Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1egFrX-000435-SZ for pgsql-committers@arkaria.postgresql.org; Mon, 29 Jan 2018 20:17:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egFrW-0000dS-QW for pgsql-committers@arkaria.postgresql.org; Mon, 29 Jan 2018 20:17:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1egFrW-0000dI-IL for pgsql-committers@lists.postgresql.org; Mon, 29 Jan 2018 20:17:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1egFrT-0000BJ-4K for pgsql-committers@postgresql.org; Mon, 29 Jan 2018 20:17:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w0TKGxQg032347; Mon, 29 Jan 2018 15:17:00 -0500 From: Tom Lane To: Andres Freund cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Initialize unused ExprEvalStep fields. In-reply-to: References: Comments: In-reply-to Andres Freund message dated "Mon, 29 Jan 2018 20:07:06 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32345.1517257019.1@sss.pgh.pa.us> Date: Mon, 29 Jan 2018 15:16:59 -0500 Message-ID: <32346.1517257019@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund 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