pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix ExecuteCallStmt to not scribble on the passed-in parse tree.
Date: Sun, 04 Nov 2018 19:51:04 +0000
Message-ID: <E1gJOQK-00021l-4D@gemulon.postgresql.org> (raw)

Fix ExecuteCallStmt to not scribble on the passed-in parse tree.

Modifying the parse tree at execution time is, or at least ought to be,
verboten.  It seems quite difficult to actually cause a crash this way
in v11 (although you can exhibit it pretty easily in HEAD by messing
with plan_cache_mode).  Nonetheless, it's risky, so fix and back-patch.

Discussion: https://postgr.es/m/13789.1541359611@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d358da81414abc57ef44dfd45dfedc3d443e5bd5

Modified Files
--------------
src/backend/commands/functioncmds.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)



view thread (2+ messages)

Message-ID: <E1gJOQK-00021l-4D@gemulon.postgresql.org>
Permalink:  ../E1gJOQK-00021l-4D@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1gJOQK-00021l-4D@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix ExecuteCallStmt to not scribble on the passed-in parse tree.
  In-Reply-To: <E1gJOQK-00021l-4D@gemulon.postgresql.org>
  References: <E1gJOQK-00021l-4D@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox