From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix set of issues with memory-allocation system calls in fronten
Date: Sat, 04 May 2019 07:33:35 +0000
Message-ID: <E1hMpAt-0002dS-3a@gemulon.postgresql.org> (raw)
Fix set of issues with memory-allocation system calls in frontend code
Like the backend, the frontend has wrappers on top of malloc() and such
whose use is recommended. Particularly, it is possible to do memory
allocation without issuing an error. Some binaries missed the use of
those wrappers, so let's fix the gap for consistency.
This also fixes two latent bugs:
- In pg_dump/pg_dumpall when parsing an ACL item, on an out-of-memory
error for strdup(), the code considered the failure as a ACL parsing
problem instead of an actual OOM.
- In pg_waldump, an OOM when building the target directory string would
cause a crash.
Author: Daniel Gustafsson
Discussion: https://postgr.es/m/gY0y9xenfoBPc-Tufsr2Zg-MmkrJslm0Tw_CMg4p_j58-k_PXNC0klMdkKQkg61BkXC9_uWo-DcUzfxn...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/84e4570da9230d45022ef77f98b560f26eaf6916
Modified Files
--------------
src/bin/pg_ctl/pg_ctl.c | 3 ++-
src/bin/pg_dump/dumputils.c | 12 +++++-------
src/bin/pg_test_fsync/pg_test_fsync.c | 2 +-
src/bin/pg_waldump/pg_waldump.c | 10 +++++-----
src/bin/psql/large_obj.c | 2 +-
5 files changed, 14 insertions(+), 15 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: Fix set of issues with memory-allocation system calls in fronten
In-Reply-To: <E1hMpAt-0002dS-3a@gemulon.postgresql.org>
References: <E1hMpAt-0002dS-3a@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