From: Michael Paquier Date: Wed, 10 Dec 2025 04:56:33 +0000 (+0900) Subject: libpq: Authorize pthread_exit() in libpq_check X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=8268e66ac64cb846517580e0808f971343391fdf;p=postgresql.git libpq: Authorize pthread_exit() in libpq_check pthread_exit() is added to the list of symbols allowed when building libpq. This has been reported as possible when libpq is statically linked to libcrypto, where pthread_exit() could be called. Reported-by: Torsten Rupp Author: Nazir Bilal Yavuz Reviewed-by: Daniel Gustafsson Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/19095-6d8256d0c37d4be2@postgresql.org --- diff --git a/src/interfaces/libpq/libpq_check.pl b/src/interfaces/libpq/libpq_check.pl index 835638cc5a2..dd03e6864fd 100755 --- a/src/interfaces/libpq/libpq_check.pl +++ b/src/interfaces/libpq/libpq_check.pl @@ -63,6 +63,10 @@ while (<$fh>) # exit. next if /__tsan_func_exit/; + # Excluding pthread_exit allows legitimate thread terminations in some + # builds. + next if /pthread_exit/; + # Anything containing "exit" is suspicious. # (Ideally we should reject abort() too, but there are various scenarios # where build toolchains insert abort() calls, e.g. to implement