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

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
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-29T23:46:35Z
Lists: pgsql-hackers
On 2021-Jun-29, Tom Lane wrote:

> More troublingly, fossa reports this:
> 
> ! nm -A -g -u libpq.so.5.15 2>/dev/null | grep -v '_eprintf\\.o:' | grep -e abort -e exit
> libpq.so.5.15:                 U abort@@GLIBC_2.2.5
> 
> Where is that coming from?  hippopotamus and jay, which seem to
> be different compilers on the same physical machine, aren't showing
> it.  That'd lead to the conclusion that icc is injecting abort()
> calls of its own accord, which seems quite nasty.  Lacking an icc
> license, I can't poke into that more directly here.

I noticed that the coverage report is not updating, and lo and behold
it's failing this bit.

I can inspect the built files ... what exactly are you looking for?

-- 
Álvaro Herrera       Valdivia, Chile
<Schwern> It does it in a really, really complicated way
<crab> why does it need to be complicated?
<Schwern> Because it's MakeMaker.



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