pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: 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>
Cc: info@cspug.cz
Subject: Re: Preventing abort() and exit() calls in libpq
Date: Sat, 03 Jul 2021 10:45:59 -0400
Message-ID: <1233492.1625323559@sss.pgh.pa.us> (raw)
In-Reply-To: <1231771.1625321413@sss.pgh.pa.us>
References: <202107021459.7c2dkzyg5lua@alvherre.pgsql>
	<819502.1625239217@sss.pgh.pa.us>
	<20210703001639.GB2374652@rfd.leadboat.com>
	<1231771.1625321413@sss.pgh.pa.us>

I wrote:
> I'm now wondering about applying the test to *.o in libpq,
> as well as libpgport_shlib.a and libpgcommon_shlib.a.
> The latter would require some code changes, and it would make
> the prohibition extend further than libpq alone.  On the bright
> side, we could reinstate the check for abort().

After consuming a bit more caffeine, I'm afraid that won't work.
I'd imagined leaving, e.g., psprintf.c out of libpgcommon_shlib.a.
But if someone mistakenly introduced a psprintf call into libpq,
it'd still compile just fine; the symbol would be resolved against
psprintf in the calling application's code.  We'd only detect a
failure when trying to use libpq with an app that didn't contain
that function, which feels like something that our own testing
could miss.

What I'm now thinking about is restricting the test to only be run on
platforms where use of foo.a libraries is deprecated, so that we can
be pretty sure that we won't hit this situation.  Even if we only
run the test on Linux, that'd be plenty to catch any mistakes.

			regards, tom lane





view thread (57+ messages)  latest in thread

Message-ID: <1233492.1625323559@sss.pgh.pa.us>
Permalink:  ../1233492.1625323559@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1233492.1625323559@sss.pgh.pa.us

 · 

reply

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, noah@leadboat.com, alvherre@alvh.no-ip.org, michael@paquier.xyz, pchampion@vmware.com, daniel@yesql.se, info@cspug.cz
  Subject: Re: Preventing abort() and exit() calls in libpq
  In-Reply-To: <1233492.1625323559@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