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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Jacob Champion <pchampion(at)vmware(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>, info(at)cspug(dot)cz
Subject: Re: Preventing abort() and exit() calls in libpq
Date: 2021-06-29 20:39:28
Message-ID: 503095.1624999168@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> So I pushed that, and not very surprisingly, it's run into some
> portability problems. gombessa (recent OpenBSD) reports

> ! nm -A -g -u libpq.so.5.15 2>/dev/null | grep -v '_eprintf\\.o:' | grep -e abort -e exit
> libpq.so.5.15:__cxa_atexit

After a few more hours, all of our OpenBSD animals have reported
that, on several different OpenBSD releases and with both gcc
and clang compilers. So at least it's a longstanding platform
behavior.

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.

Perhaps we could wrap the test for abort() in something like
'if "$CC" != icc then ...', but ugh.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2021-06-29 20:45:52 Re: WIP: Relaxing the constraints on numeric scale
Previous Message Robert Haas 2021-06-29 20:34:32 Re: WIP: Relaxing the constraints on numeric scale