From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, 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-07-03 14:45:59 |
Message-ID: | 1233492.1625323559@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2021-07-03 15:00:42 | Re: OpenSSL 3.0.0 compatibility |
Previous Message | Tom Lane | 2021-07-03 14:14:38 | Re: rand48 replacement |