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 202106301258.xdrqcxocchyg@alvherre.pgsql
Whole thread Raw
In response to Re: Preventing abort() and exit() calls in libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Preventing abort() and exit() calls in libpq
Re: Preventing abort() and exit() calls in libpq
List pgsql-hackers
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.

> What platform does the coverage report run on exactly?

It's Debian Buster.

libpq.so is linked as

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels
-Wmissing-format-attribute-Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv
-fexcess-precision=standard-Wno-format-truncation -Wno-stringop-truncation -fprofile-arcs -ftest-coverage -O0 -pthread
-D_REENTRANT-D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fPIC -shared -Wl,-soname,libpq.so.5
-Wl,--version-script=exports.list-o libpq.so.5.15  fe-auth-scram.o fe-connect.o fe-exec.o fe-lobj.o fe-misc.o
fe-print.ofe-protocol3.o fe-secure.o fe-trace.o legacy-pqsignal.o libpq-events.o pqexpbuffer.o fe-auth.o
fe-secure-common.ofe-secure-openssl.o -L../../../src/port -L../../../src/common -lpgcommon_shlib -lpgport_shlib
-L/usr/lib/llvm-6.0/lib -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags  -lssl -lcrypto -lm
-lldap_r 
 

and libpgport was just

ar crs libpgport_shlib.a fls_shlib.o getpeereid_shlib.o strlcat_shlib.o strlcpy_shlib.o pg_crc32c_sse42_shlib.o
pg_crc32c_sb8_shlib.opg_crc32c_sse42_choose_shlib.o bsearch_arg_shlib.o chklocale_shlib.o erand48_shlib.o
inet_net_ntop_shlib.onoblock_shlib.o path_shlib.o pg_bitutils_shlib.o pg_strong_random_shlib.o pgcheckdir_shlib.o
pgmkdirp_shlib.opgsleep_shlib.o pgstrcasecmp_shlib.o pgstrsignal_shlib.o pqsignal_shlib.o qsort_shlib.o
qsort_arg_shlib.oquotes_shlib.o snprintf_shlib.o strerror_shlib.o tar_shlib.o thread_shlib.o
 

-- 
Álvaro Herrera                        Valdivia, Chile
                        https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Andrey Lepikhov
Date:
Subject: Re: Merging statistics from children instead of re-sampling everything
Next
From: Alvaro Herrera
Date:
Subject: Re: Preventing abort() and exit() calls in libpq