From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove dependency to system calls for memory allocation in refin
Date: Wed, 08 Jan 2020 01:03:39 +0000
Message-ID: <E1iozl5-0004kV-2c@gemulon.postgresql.org> (raw)
Remove dependency to system calls for memory allocation in refint
Failures in allocations could lead to crashes with NULL pointer
dereferences . Memory context TopMemoryContext is used instead to keep
alive the plans allocated in the session. A more specific context could
be used here, but this is left for later.
Reported-by: Jian Zhang
Author: Michael Paquier
Reviewed-by: Tom Lane, Andres Freund
Discussion: https://postgr.es/m/16190-70181c803641c3dc@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b0b6196386681383b8f0cb76df4fd35178a7371e
Modified Files
--------------
contrib/spi/refint.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
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: michael@paquier.xyz
Subject: Re: pgsql: Remove dependency to system calls for memory allocation in refin
In-Reply-To: <E1iozl5-0004kV-2c@gemulon.postgresql.org>
References: <E1iozl5-0004kV-2c@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