Re: Preventing abort() and exit() calls in libpq - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Preventing abort() and exit() calls in libpq
Date
Msg-id 151972.1624888456@sss.pgh.pa.us
Whole thread Raw
In response to Re: Preventing abort() and exit() calls in libpq  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes:
> A possible trick is to add ccp flags such as: -Dexit=exit_BAD 
> -Dabort=abort_BAD.

Not really going to work, at least not without a lot of fragile
kluges, because the main problem here is to prevent libpq from
*indirectly* calling those functions via stuff it imports from
src/port or src/common.

It's possible that we could make it work by generalizing the
policy that "libpq may not call abort/exit" into "no PG shlib
may call abort/exit", and then apply the cpp #defines while
compiling the xxx_shlib.o variants of those files.  This does
not seem more attractive than what I proposed, though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Preventing abort() and exit() calls in libpq
Next
From: Tom Lane
Date:
Subject: Re: Unbounded %s in sscanf