This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug gcov/profile/21810] New: -pg causes libexpat code to crash
- From: "oliverst at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2005 23:34:57 -0000
- Subject: [Bug gcov/profile/21810] New: -pg causes libexpat code to crash
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When you compile a program with "-pg" against libexpat 1.95.8 and you call
XML_ParserCreate() it does crash. this is not happening, if you don't add "-pg".
The source I used was distributed with the official MAME source code package
(http://www.mame.net/downmain.html - win32 sourcecode, but the related source
should be platform-independent). The easiest way to test it, is just to compile
the "xml2info" tool, that part is of MAME, add "-pg" to compiler and linkers
flags and run it, it will crash immediately.
Here is the backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x0040e456 in poolInit (pool=0x40e44d, ms=0x0) at src/expat/xmlparse.c:5874
5874 pool->blocks = NULL;
(gdb) bt
#0 0x0040e456 in poolInit (pool=0x40e44d, ms=0x0) at src/expat/xmlparse.c:5874
#1 0x0040d339 in dtdCreate (ms=0x3f2554) at src/expat/xmlparse.c:5428
#2 0x00403193 in parserCreate (encodingName=0x0, memsuite=0x0, nameSep=0x0,
dtd=0x0) at src/expat/xmlparse.c:737
#3 0x00402fb7 in XML_ParserCreate_MM (encodingName=0x0, memsuite=0x0,
nameSep=0x0) at src/expat/xmlparse.c:671
#4 0x00402f4b in XML_ParserCreate (encodingName=0x0)
at src/expat/xmlparse.c:648
#5 0x00402b7c in process (is=0x7803a690, os=0x7803a6b0) at src/xml2info.c:766
#6 0x00402efe in main (argc=1, argv=0x3f24c8) at src/xml2info.c:835
My GCC version:
Reading specs from C:/MINGW/BIN/../lib/gcc/mingw32/3.4.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
ation --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
--
Summary: -pg causes libexpat code to crash
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gcov/profile
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: oliverst at online dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21810