pgsql: Remove dependency to system calls for memory allocation in refin

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove dependency to system calls for memory allocation in refin
Date: 2020-01-08 01:03:39
Message-ID: E1iozl5-0004kV-2c@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-01-08 01:37:51 pgsql: Revert "Forbid DROP SCHEMA on temporary namespaces"
Previous Message Tom Lane 2020-01-07 22:28:57 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.