public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19985] New: executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit ()
@ 2005-02-16  3:32 lothar at xcerla dot com
  2005-02-16  3:32 ` [Bug middle-end/19985] " pinskia at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: lothar at xcerla dot com @ 2005-02-16  3:32 UTC (permalink / raw)
  To: gcc-bugs

I created a small test I will attach to this bug report that shows that  
executables created with -fprofile-arcs -ftest-coverage crash in gcov_exit () 
if they dynamically load functions from libraries. 
 
I tested with gcc 3.4.1 and 4.0-20050213. Both show the same problem. 
 
Here's the gdb stack trace for both compilers: 
 
Program terminated with signal 11, Segmentation fault. 
 
#0  gcov_exit () at ../../gcc-3.4.1/gcc/libgcov.c:139 
139               if (!((1 << t_ix) & gi_ptr->ctr_mask)) 
(gdb) where 
#0  gcov_exit () at ../../gcc-3.4.1/gcc/libgcov.c:139 
#1  0x4018b820 in exit () from /lib/tls/libc.so.6 
#2  0x40176b1a in __libc_start_main () from /lib/tls/libc.so.6 
#3  0x080491b1 in _start () at ../sysdeps/i386/elf/start.S:119 
 
Program terminated with signal 11, Segmentation fault. 
 
#0  gcov_exit () at ../../gcc-4.0-20050213/gcc/libgcov.c:139 
139               if (!((1 << t_ix) & gi_ptr->ctr_mask)) 
((gdb) where 
#0  gcov_exit () at ../../gcc-4.0-20050213/gcc/libgcov.c:139 
#1  0x4018b820 in exit () from /lib/tls/libc.so.6 
#2  0x40176b1a in __libc_start_main () from /lib/tls/libc.so.6 
#3  0x08049031 in _start () at ../sysdeps/i386/elf/start.S:119 
 
 
The test uses SCons as a build tool. But I give the build arguments here for 
the 3.4.1 compiler: 
 
/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 
 
 
Lothar

-- 
           Summary: executables created with -fprofile-arcs -ftest-coverage
                    segfault in gcov_exit ()
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lothar at xcerla dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2005-06-21 20:31 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-16  3:32 [Bug c++/19985] New: executables created with -fprofile-arcs -ftest-coverage segfault in gcov_exit () lothar at xcerla dot com
2005-02-16  3:32 ` [Bug middle-end/19985] " pinskia at gcc dot gnu dot org
2005-02-16  3:37 ` lothar at xcerla dot com
2005-02-16  3:48 ` pinskia at gcc dot gnu dot org
2005-03-01  1:03 ` lothar at xcerla dot com
2005-03-01  1:16 ` pinskia at gcc dot gnu dot org
2005-03-01  1:23 ` lothar at xcerla dot com
2005-03-08  3:59 ` renierm at us dot ibm dot com
2005-03-08 14:52 ` pinskia at gcc dot gnu dot org
2005-03-10 19:42 ` janis at gcc dot gnu dot org
2005-03-11  1:32 ` janis at gcc dot gnu dot org
2005-03-11 23:54 ` janis at gcc dot gnu dot org
2005-03-15 17:22 ` [Bug middle-end/19985] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-03-25  0:09 ` janis at gcc dot gnu dot org
2005-04-21  5:01 ` mmitchel at gcc dot gnu dot org
2005-05-02 18:03 ` cvs-commit at gcc dot gnu dot org
2005-05-02 18:05 ` cvs-commit at gcc dot gnu dot org
2005-05-02 18:09 ` cvs-commit at gcc dot gnu dot org
2005-05-02 19:02 ` pinskia at gcc dot gnu dot org
2005-06-21 20:31 ` matz at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).