From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jacob Champion <pchampion@vmware.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Daniel Gustafsson <daniel@yesql.se>
Subject: Re: Preventing abort() and exit() calls in libpq
Date: Tue, 29 Jun 2021 13:15:30 -0400
Message-ID: <451278.1624986930@sss.pgh.pa.us> (raw)
In-Reply-To: <340320.1624912475@sss.pgh.pa.us>
References: <3128896.1624742969@sss.pgh.pa.us>
<340320.1624912475@sss.pgh.pa.us>
I wrote:
>> This relies on "nm" being able to work on shlibs, which it's not
>> required to by POSIX. However, it seems to behave as desired even
>> on my oldest dinosaurs. In any case, if "nm" doesn't work then
>> we'll just not detect such problems on that platform, which should
>> be OK as long as the test does work on common platforms.
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
So far as I can find, __cxa_atexit is a C++ support routine, so
I wondered what the heck libpq.so is doing calling it. I managed
to reproduce the failure here using an OpenBSD installation I had
at hand, and confirmed that __cxa_atexit is *not* referenced by any
of the .o files in src/port, src/common, or src/interfaces/libpq.
So apparently it's being injected at some fairly low level of the
shlib support on that platform.
Probably the thing to do is adjust the grep filter to exclude
__cxa_atexit, but I want to wait awhile and see whether any
other buildfarm animals report this. morepork at least will
be pretty interesting, since it's a slightly older OpenBSD
vintage.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, pchampion@vmware.com, daniel@yesql.se
Subject: Re: Preventing abort() and exit() calls in libpq
In-Reply-To: <451278.1624986930@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox