Re: Preventing abort() and exit() calls in libpq

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jacob Champion <pchampion@vmware.com>
Cc: "alvherre@alvh.no-ip.org" <alvherre@alvh.no-ip.org>, "daniel@yesql.se" <daniel@yesql.se>, "info@cspug.cz" <info@cspug.cz>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, "michael@paquier.xyz" <michael@paquier.xyz>
Date: 2021-07-03T15:23:56Z
Lists: pgsql-hackers
I wrote:
> Hmmm ... mine is 8.4.1.
> I'm about to go out to dinner, but will check into this with some
> newer gcc versions later.

Tried --enable-coverage on Fedora 34 (with gcc 11.1.1) and sure
enough there's an exit() call being inserted.  I've pushed a fix
to just disable the check altogether in --enable-coverage builds.

			regards, tom lane



Commits

  1. Further restrict the scope of no-exit()-in-libpq test.

  2. Improve build-time check that libpq doesn't call exit().

  3. Fix portability fallout from commit dc227eb82.

  4. Add a build-time check that libpq doesn't call exit() or abort().