[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
--- Additional Comments From janis at gcc dot gnu dot org 2005-03-11 23:53 --- This is a regression from GCC 3.3. I'm working on a patch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
--- Additional Comments From janis at gcc dot gnu dot org 2005-03-10 19:42 --- Created an attachment (id=8373) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8373action=view) smaller C test case The test case provided by the submitter runs successfully if the executable is built without -Wl,-E, as does the smaller C test case. I understand that the original program needs to use that option, so I'll continue looking into this to find a fix and perhaps a workaround. The new test case fails with a plain make invocation for mainline, 4.0-branch, and 3.4-branch, and passes for all of those with make EXP=. -- What|Removed |Added AssignedTo|unassigned at gcc dot gnu |janis at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
--- Additional Comments From janis at gcc dot gnu dot org 2005-03-11 01:32 --- The submitter's testcase works if function __gcov_init in libgcov.c is declared hidden. Probably all of the __gcov* symbols ought to be hidden; I'll work on a patch to hide that symbol and others that seem appropriate. Possible workaround: The linker's -E option exports all global symbols from the executable to the dynamic symbol table. A subset of global symbols can be exported by using -E along with --version-script to list symbols to export. Depending on how many symbols a shared object needs to access from a shared object, this might be a reasonable workaround. I consulted an expert, and unfortunatly there doesn't seem to be a way to say export all symbols except this small list. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
-- What|Removed |Added Severity|critical|normal Keywords|wrong-code | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
--- Additional Comments From renierm at us dot ibm dot com 2005-03-08 03:59 --- I am experiencing the same exact problem with our project http://openhpi.sf.net. gcov_exit() segfaults when the project is compiled with -fprofile-arcs and -ftest-coverage using gcc-3.4.x, and unit tests are ran against the compiled library. This is a real and preoccupying problem for us on gcc-3.4.x. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
--- Additional Comments From lothar at xcerla dot com 2005-03-01 01:03 --- Changed severity to critical, as the compiler produces code that crashes when executing a coverage enabled executable. -- What|Removed |Added Severity|normal |critical http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-01 01:15 --- (In reply to comment #3) Changed severity to critical, as the compiler produces code that crashes when executing a coverage enabled executable. Well considering this is werid case of using arc profiling with shared libraries it is not critical and has a workaround, not unloading the shared library. -- What|Removed |Added Severity|critical|normal http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
--- Additional Comments From lothar at xcerla dot com 2005-03-01 01:23 --- A bug that creates wrong code is critical for me. As our application depends on dynamically loading libraries, there's simply NO workaround for this bug. We can NOT execute any executables built with code coverage with either 3.4.1 or 4.0.0. I am really worried that 4.0.0 may get released without fully working code coverage. P.S. I tried to mark the bug as waiting for feedback, but it said I do not have the permissions. Am I not the owner of the bug? If possible mark the bug as waiting for feedback and the Target Milestone to 4.0.0. Thanks -- What|Removed |Added Severity|normal |critical Keywords||wrong-code Known to fail||3.4.1 4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
-- What|Removed |Added CC||hubicka at gcc dot gnu dot ||org Component|c++ |middle-end http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
--- Additional Comments From lothar at xcerla dot com 2005-02-15 21:46 --- Created an attachment (id=8201) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8201action=view) test case to reproduce the segfault This is a project of a small test case that reproduces the segmentation fault. It's build tool is SCons. If you don not want to use SCons, here's the command line(s) executed: /opt2/GNU/bin/g++-3.4.1 -O0 -g -D_REENTRANT -W -Wall -Wpointer-arith -Wno-uninitialized -Woverloaded-virtual -Wcast-align -Wwrite-strings -Wcomments -march=pentiumpro -DCOVERAGE -fprofile-arcs -ftest-coverage -Isrc -c -o src/prog/.build/posix/coverage/main.o src/prog/main.cpp /opt2/GNU/bin/g++-3.4.1 -g -Wl,-E -o bin/posix/coverage/prog src/prog/.build/posix/coverage/main.o -Llib/posix/coverage -lstdc++ -lpthread -lrt -ldl -lgcov /opt2/GNU/bin/g++-3.4.1 -O0 -g -D_REENTRANT -W -Wall -Wpointer-arith -Wno-uninitialized -Woverloaded-virtual -Wcast-align -Wwrite-strings -Wcomments -march=pentiumpro -DCOVERAGE -fprofile-arcs -ftest-coverage -fPIC -Isrc -c -o src/calc/.build/posix/coverage/calc.os src/calc/calc.cpp /opt2/GNU/bin/g++-3.4.1 -g -Wl,-E -Wl,-soname=libcalc.so.1.0 -shared -o lib/posix/coverage/libcalc.so src/calc/.build/posix/coverage/calc.os -Llib/posix/coverage -lstdc++ -lpthread -lrt -ldl -lgcov -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985
[Bug middle-end/19985] executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-15 21:55 --- Hmm, this looks like we don't deal with dlclose correctly. Honza could you comment on this if there is a way to deal with dlclose? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985