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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix ExecuteCallStmt to not scribble on the passed-in parse tree.
Date: 2018-11-04 19:51:04
Message-ID: E1gJOQK-00021k-45@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Details
-------
https://git.postgresql.org/pg/commitdiff/9b6fb9fbb48dda828dcca47adc418632ddb36202

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

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-11-04 21:57:52 pgsql: Release notes for 11.1, 10.6, 9.6.11, 9.5.15, 9.4.20, 9.3.25.
Previous Message Tom Lane 2018-11-04 18:25:49 pgsql: Fix bugs in plpgsql's handling of CALL argument lists.