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

From Alvaro Herrera
Subject Re: Preventing abort() and exit() calls in libpq
Date
Msg-id 202106301310.hcgqcu3dxumf@alvherre.pgsql
Whole thread Raw
In response to Re: Preventing abort() and exit() calls in libpq  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Preventing abort() and exit() calls in libpq
List pgsql-hackers
On 2021-Jun-30, Alvaro Herrera wrote:

> On 2021-Jun-29, Tom Lane wrote:
> 
> > Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > > Ah, I nm'd all files in src/interfaces/libpq and got no hits for abort.
> > > But I did get one in libpgport_shlib.a:
> > 
> > > path_shlib.o:
> > >                  U abort
> > 
> > Yeah, there is one in get_progname().  But path.o shouldn't be getting
> > pulled into libpq ... else why aren't all the animals failing?
> 
> Maybe there's something about the linker flags being used.
> 
> ... ah yeah, if I configure with coverage enabled on my machine, it fails in the same way.

If I remove -fprofile-arcs from CFLAGS, then abort is no longer present,
but we still get a fail because of __gcov_exit.  I suppose if you'd add
an exception for __cxa_atexit, the same place could use one for
__gcov_exit.

I'm not sure what to make of the -fprofile-arcs stuff though.

-- 
Álvaro Herrera                        Valdivia, Chile
                        https://www.EnterpriseDB.com/
"Java is clearly an example of money oriented programming"  (A. Stepanov)



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Preventing abort() and exit() calls in libpq
Next
From: Tom Lane
Date:
Subject: Re: Remove redundant initializations