[xml] Crash in xmlParseFile




Hi,

I recently experienced a crash in xmlParseFile and I can't manage
to figure out its origin.

I'm using Suse 8. My program is multi-threaded but the crash happens
far before any thread is created (almost at the beggining of the
program)
I grabbed the latest libxml2 and built it with --with-threads and
--with-thread-alloc and rebuilt my program against it. But it changed
nothing. I suspect something related to glibc but I have been using
xmlParseFile for quite some time without any problem.

Thanks in advance for your help.

Here is the backtrace:

Starting program: /home/jmarant/cvs/src/app-control
[New Thread 1024 (LWP 31898)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 31898)]
0x40320411 in chunk_alloc () from /lib/i686/libc.so.6
(gdb) bt
#0  0x40320411 in chunk_alloc () from /lib/i686/libc.so.6
#1  0x4031ff72 in malloc () from /lib/i686/libc.so.6
#2  0x40165ace in xmlBufferCreateSize__internal_alias (size=8192) at tree.c:6615
#3  0x40169ef1 in xmlAllocParserInputBuffer__internal_alias
(enc=XML_CHAR_ENCODING_NONE) at xmlIO.c:2016
#4  0x4016a27c in __xmlParserInputBufferCreateFilename (URI=0x80b8100
"/etc/osw/control/control.conf", enc=XML_CHAR_ENCODING_NONE)
    at xmlIO.c:2183
#5  0x4016a37f in xmlParserInputBufferCreateFilename__internal_alias
(URI=0x80b8100 "/etc/osw/control/control.conf",
    enc=XML_CHAR_ENCODING_NONE) at xmlIO.c:2229
#6  0x40148235 in xmlNewInputFromFile__internal_alias (ctxt=0x80b8f38,
filename=0x80b8100 "/etc/osw/control/control.conf")
    at parserInternals.c:1492
#7  0x4016b9bd in xmlDefaultExternalEntityLoader (URL=0x80b8100
"/etc/osw/control/control.conf", ID=0x0, ctxt=0x80b8f38) at xmlIO.c:3496
#8  0x4016bac1 in xmlLoadExternalEntity__internal_alias (URL=0x80b8100
"/etc/osw/control/control.conf", ID=0x0, ctxt=0x80b8f38)
    at xmlIO.c:3557
#9  0x4015c020 in xmlCreateURLParserCtxt__internal_alias (filename=0x80b8100
"/etc/osw/control/control.conf", options=0)
    at parser.c:11495
#10 0x4015c0b1 in xmlCreateFileParserCtxt__internal_alias (filename=0x80b8100
"/etc/osw/control/control.conf") at parser.c:11523
#11 0x4015c0e8 in xmlSAXParseFileWithData__internal_alias (sax=0x0,
filename=0x80b8100 "/etc/osw/control/control.conf", recovery=0,
    data=0x0) at parser.c:11555
#12 0x4015c226 in xmlSAXParseFile__internal_alias (sax=0x0, filename=0x80b8100
"/etc/osw/control/control.conf", recovery=0)
    at parser.c:11617
#13 0x4015c283 in xmlParseFile__internal_alias (filename=0x80b8100
"/etc/osw/control/control.conf") at parser.c:11648
#14 0x08051116 in cfg_read (filename=0x80b8100 "/etc/osw/control/control.conf")
at cfg.c:250
#15 0x08052d5c in main (argc=1, argv=0xbffff514) at main.c:395
#16 0x402ca4c2 in __libc_start_main () from /lib/i686/libc.so.6

--
Jérôme Marant



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