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

From: Nathan Bossart <[email-masked]>
Date: Fri, 07 Mar 2025 21:23:58 +0000

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 <[email-masked]>
Suggested-by: Andres Freund <[email-masked]>
Discussion: https://postgr.es/m/ace01111-f9ac-4f61-b1b1-8e9379415444%40vondra.me
Backpatch-through: 17

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/088f8e2d568eaa963fe68a15287002081314fad8

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