This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-6-branch test failures: g++ c-c++-common/asan/pr59063-2.c
- From: Jason Vas Dias <jason dot vas dot dias at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 22 May 2018 16:26:03 +0000
- Subject: Re: gcc-6-branch test failures: g++ c-c++-common/asan/pr59063-2.c
This problem turned out to be because the objects in
libasan.a of gcc-6-branch are built with -fPIC / -DPIC :
if 'PIC' is defined, the code in asan_linux.c is
assuming it has been dynamically loaded , and so
does not allow libasan.so NOT to be the first
required dynamic library. But adding '-lasan'
is a bad idea, since then the
dlsym(RTLD_NEXT,"sigaction")
actually resolves to __interception::sigaction
which ends up calling itself until stack is exhausted.
For some reason (which I am trying to figure out, but
which is not obvious) the gcc-7-branch libasan build
does build all the libasan.a objects without -fPIC -DPIC
correctly, and so does not have this problem.
It looks like use of 'static-libasan' in GCC 6 builds
is thoroughly disabled and broken because of libasan.a
objects ARE built with -fPIC / -DPIC .
Maybe I should raise a bug about this?
Thanks & Regards,
Jason