pgsql: Fix possible crash due to incorrect allocation context.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix possible crash due to incorrect allocation context.
Date: 2016-08-16 17:29:49
Message-ID: E1bZiBR-0004mL-Me@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix possible crash due to incorrect allocation context.

Commit af33039317ddc4a0e38a02e2255c2bf453115fd2 aimed to reduce
leakage from tqueue.c, which is good. Unfortunately, by changing the
memory context in which all of gather_readnext() executes, it also
changed the context in which ExecShutdownGatherWorkers executes, which
is not good, because that function eventually causes a call to
ExecParallelRetrieveInstrumentation, which proceeds to allocate
planstate->worker_instrument in a short-lived context, causing a
crash.

Rushabh Lathia, reviewed by Amit Kapila and by me.

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/0aa1e9a44db0b8f8b08acadf2833c724489bd279

Modified Files
--------------
src/backend/executor/execParallel.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-08-16 17:59:06 pgsql: Automate the maintenance of SO_MINOR_VERSION for our shared libr
Previous Message Tom Lane 2016-08-16 16:49:34 pgsql: Remove separate version numbering for ecpg preprocessor.