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

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Michael Paquier <michael@paquier.xyz>, Jacob Champion <pchampion@vmware.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Daniel Gustafsson <daniel@yesql.se>, info@cspug.cz
Date: 2021-06-30T14:42:55Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2021-Jun-30, Tom Lane wrote:
>> You mentioned __gcov_exit, but I'm not sure if we need an
>> exception for that.  I see it referenced by the individual .o
>> files, but the completed .so has no such reference, so at least
>> on RHEL8 it's apparently satisfied during .so linkage.  Do you
>> see something different?

> Well, not really.  I saw it but only after I removed -fprofile-arcs from
> Makefile.shlib's link line; but per my other email, that doesn't really
> work.
> Everything seems to work well for me after removing abort from that grep.

OK, thanks, will push a fix momentarily.

			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().