From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Detect format-string mistakes in the libpq_pipeline test module.
Date: Thu, 15 Sep 2022 21:18:03 +0000
Message-ID: <E1oYwFH-000VY8-3r@gemulon.postgresql.org> (raw)
Detect format-string mistakes in the libpq_pipeline test module.
I happened to notice that libpq_pipeline's private implementation
of pg_fatal lacked any pg_attribute_printf decoration. Indeed,
adding that turned up a mistake! We'd likely never have noticed
because the error exits in this code are unlikely to get hit,
but still, it's a bug.
We're so used to having the compiler check this stuff for us that
a printf-like function without pg_attribute_printf is a land mine.
I wonder if there is a way to detect such omissions.
Back-patch to v14 where this code came in.
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/bff7bc6cb785191041aa7530febdbb5cfe6eaf06
Modified Files
--------------
src/test/modules/libpq_pipeline/libpq_pipeline.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Detect format-string mistakes in the libpq_pipeline test module.
In-Reply-To: <E1oYwFH-000VY8-3r@gemulon.postgresql.org>
References: <E1oYwFH-000VY8-3r@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