pgsql: Assert that wrapper_handler()'s argument is within expected rang

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Assert that wrapper_handler()'s argument is within expected rang
Date: 2025-03-07 21:23:58
Message-ID: E1tqfAk-001K8L-07@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Assert that wrapper_handler()'s argument is within expected range.

pqsignal() already does a similar check, but strange Valgrind
reports have us wondering if wrapper_handler() is somehow getting
called with an invalid signal number.

Reported-by: Tomas Vondra <tomas(at)vondra(dot)me>
Suggested-by: Andres Freund <andres(at)anarazel(dot)de>
Discussion: https://postgr.es/m/ace01111-f9ac-4f61-b1b1-8e9379415444%40vondra.me
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c3510cfc8b401d61812713c4ccf040125dc7ce1b

Modified Files
--------------
src/port/pqsignal.c | 4 ++++
1 file changed, 4 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2025-03-07 23:35:30 pgsql: nbtree: refine _bt_readnextpage contract comments.
Previous Message Peter Eisentraut 2025-03-07 21:22:19 Re: pgsql: Allow parallel CREATE INDEX for GIN indexes