libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ltdl and gcov


From: Thomas Moulard
Subject: Ltdl and gcov
Date: Mon, 27 Jul 2009 18:43:24 +0900

Hello,
I am trying to integrate gcov into my buildchain but I ran into the
following problem:
if I compile my Autoconf/Automake/Libtool package using -fprofile-arcs
and -ftest-coverage, the
program produces a segv at the end of the execution.
This program load a ltdl plug-in, do a simple thing and unload it.

The problem only arrive when I compile with -fprofile-arcs,
-ftest-coverage and if lt_dlclose
is called to properly unload the plug-in.
If I do not call lt_dlclose it always works, if I do not use these two
compiling flags it always work
and Valgrind does not report any error.

When it fails, gdb and valgrind indicates that the program jumped to
an invalid address in libc-start.c:252.

Last thing: when I tried to compile with test coverage support both my
plug-in /and/ my loader were recompiled
with that flag.

For now, I workaround the problem by doing:
# Make sure one does not compile a plug-in with test coverage support as
# it seems to trigger a segv at exit.
roboptim_core_dummy_plugin_la_CXXFLAGS = \
        `echo $(CXXFLAGS) | sed -e 's/-ftest-coverage//' -e 
's/-fprofile-arcs//'`

...but a clear explanation of this issue would be greatly appreciated.

Thanks,
-- 
Thomas Moulard




reply via email to

[Prev in Thread] Current Thread [Next in Thread]