Re: BUG #19095: Test if function exit() is used fail when linked static
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: BharatDB <bharatdbpg@gmail.com>
Cc: torsten.rupp@gmx.net, pgsql-bugs@lists.postgresql.org,
michael@paquier.xyz,
VASUKI M <vasukim1992002@gmail.com>
Date: 2025-11-12T06:38:47Z
Lists: pgsql-bugs, pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
libpq: Authorize pthread_exit() in libpq_check
- 8268e66ac64c 19 (unreleased) landed
-
Fix meson warning due to missing declaration of NM
- 801b4ee7fae1 19 (unreleased) landed
-
libpq: Refactor logic checking for exit() in shared library builds
- 4a8e6f43a6b5 19 (unreleased) landed
BharatDB <bharatdbpg@gmail.com> writes:
>> [1]Changing the grep pattern to match the exact symbol ('grep -x exit')
>> prevents such false positives.
We might as well remove the test entirely as do that; it would
fail to detect "_exit" for example.
Additionally, I don't have a lot of faith in "grep -x" being
universally portable. POSIX 2018 does specify that switch, but
it mentions that it is "historically available only with fgrep".
Personally I'm okay with whitelisting pthread_exit() as
Torsten suggested.
BTW, it looks like libpq's meson.build is missing this check.
regards, tom lane