pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Detect format-string mistakes in the libpq_pipeline test module.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Detect format-string mistakes in the libpq_pipeline test module.
@ 2022-09-15 21:18 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2022-09-15 21:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Detect format-string mistakes in the libpq_pipeline test module.
@ 2022-09-15 21:18 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2022-09-15 21:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4e2a88905d7c05066a3caddc1f6ee76864e24c38

Modified Files
--------------
src/test/modules/libpq_pipeline/libpq_pipeline.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Detect format-string mistakes in the libpq_pipeline test module.
@ 2022-09-15 21:18 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2022-09-15 21:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-09-15 21:18 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-15 21:18 pgsql: Detect format-string mistakes in the libpq_pipeline test module. Tom Lane <tgl@sss.pgh.pa.us>
2022-09-15 21:18 pgsql: Detect format-string mistakes in the libpq_pipeline test module. Tom Lane <tgl@sss.pgh.pa.us>
2022-09-15 21:18 pgsql: Detect format-string mistakes in the libpq_pipeline test module. Tom Lane <tgl@sss.pgh.pa.us>

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