From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Detect format-string mistakes in the libpq_pipeline test module. |
Date: | 2022-09-15 21:18:03 |
Message-ID: | E1oYwFH-000VY4-2w@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
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
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cf2c7a736e4939ff0d6cf2acd29b17eea3bca7c2
Modified Files
--------------
src/test/modules/libpq_pipeline/libpq_pipeline.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-09-16 01:54:38 | warning about missing format string annotations |
Previous Message | Andres Freund | 2022-09-15 21:09:38 | Re: pgsql: aix: No need to use mkldexport when we want to export all symbol |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-09-15 22:11:05 | Re: [RFC] building postgres with meson - v13 |
Previous Message | Thomas Munro | 2022-09-15 21:14:20 | Re: [RFC] building postgres with meson - v13 |