pgsql: Detect format-string mistakes in the libpq_pipeline test module. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Detect format-string mistakes in the libpq_pipeline test module.
Date
Msg-id E1oYwFH-000VY8-3r@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: aix: No need to use mkldexport when we want to export all symbol
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Don't allow creation of database with ICU locale with unsupporte