Re: [xml] New error layer seems to break ABI compatibility...
- From: Mike Hommey <mh glandium org>
- To: xml gnome org
- Subject: Re: [xml] New error layer seems to break ABI compatibility...
- Date: Mon, 27 Oct 2003 22:18:39 +0900
On Monday October 27 2003 16:38, Mike Hommey wrote:
On Monday October 27 2003 16:09, Mike Hommey wrote:
[...]
Which may lead to conclude that there is something incompatible with the
new error management layer.
I did not have time to investigate further, but if you have paths you
want me to follow to track this incompatibility bug, I'll be happy to
give a hand.
Investigating a bit further shows it is not an API breakage, but only an
ABI breakage : recompiling scrollkeeper against libxml2 2.6.0 make it work
perfectly.
Okay, I still don't understand how it happened to work properly at some time,
but it appears that the scrollkeeper package compiled against libxml2 2.6.0
doesn't work either.
Now, I recompiled bith scrollkeeper and libxml2 with debugging symbols, so
that backtrace is much more verbose :
# gdb scrollkeeper-update
GNU gdb 5.3-debian
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux"...
(gdb) run
Starting program: /usr/bin/scrollkeeper-update
[New Thread 16384 (LWP 17982)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 17982)]
0x40079c53 in __xmlRaiseError (schannel=0, channel=0x40024450
<sk_dtd_validation_message>,
data=0xbfffe69f, ctx=0xbfffe69f, nod=0x804d918, domain=4, code=518,
level=XML_ERR_ERROR,
file=0x0, line=0, str1=0x804d958 "subject", str2=0x804d958 "subject",
str3=0x0,
int1=-1663232, int2=-1663232, msg=0x4012a1c0 "Element %s does not carry
attribute %s\n")
at error.c:453
453 if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax !=
NULL) &&
(gdb) bt
#0 0x40079c53 in __xmlRaiseError (schannel=0, channel=0x40024450
<sk_dtd_validation_message>,
data=0xbfffe69f, ctx=0xbfffe69f, nod=0x804d918, domain=4, code=518,
level=XML_ERR_ERROR,
file=0x0, line=0, str1=0x804d958 "subject", str2=0x804d958 "subject",
str3=0x0,
int1=-1663232, int2=-1663232, msg=0x4012a1c0 "Element %s does not carry
attribute %s\n")
at error.c:453
#1 0x400a774b in xmlErrValidNode (ctxt=0xffe69f00, node=0xffe69f00,
error=-1663232,
msg=0xffe69f00 <Address 0xffe69f00 out of bounds>, str1=0xbfffe69f "",
str2=0xffe69f00 <Address 0xffe69f00 out of bounds>, str3=0x0) at
valid.c:171
#2 0x400aed6b in xmlValidateOneElement (ctxt=0xbfffe6a0, doc=0x0,
elem=0x804d918) at valid.c:5941
#3 0x400af781 in xmlValidateElement (ctxt=0xbfffe6a0, doc=0x804d618,
elem=0x804d918)
at valid.c:6062
#4 0x400af816 in xmlValidateElement (ctxt=0xbfffe6a0, doc=0x804d618,
elem=0x804d770)
at valid.c:6073
#5 0x400af816 in xmlValidateElement (ctxt=0xbfffe6a0, doc=0x804d618,
elem=0x804d6b8)
at valid.c:6073
#6 0x400afce9 in xmlValidateDtd (ctxt=0xbfffe6a0, doc=0xbfffe69f,
dtd=0xbfffe69f) at valid.c:6278
#7 0x4002609f in install (
omf_name=0x804c3a8 "/usr/share/omf/gnome-applets/gweather_applet-it.omf",
scrollkeeper_dir=0xbffff760 "/var/lib/scrollkeeper",
data_dir=0xbffff460 "/usr/share/scrollkeeper", outputprefs=0 '\0') at
install.c:189
#8 0x08049d2b in main (argc=134529736, argv=0x0) at update.c:520
The interesting part is that xmllint also segfaults on the same file when
trying to run xmllint --dtdvalid /usr/share/xml/scrollkeeper/dtds/
scrollkeeper-omf.dtd /usr/share/omf/gnome-applets/gweather_applet-it.omf
Here is the backtrace for that :
# gdb xmllint
GNU gdb 5.3-debian
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux"...
(gdb) run --dtdvalid /usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd /
usr/share/omf/gnome-applets/gweather_applet-it.omf
Starting program: /usr/bin/xmllint --dtdvalid /usr/share/xml/scrollkeeper/
dtds/scrollkeeper-omf.dtd /usr/share/omf/gnome-applets/gweather_applet-it.omf
[New Thread 16384 (LWP 18055)]
<?xml version="1.0" standalone="no"?>
<omf>
<resource>
<title>
Applet GNOME Weather
</title>
<subject>
<category>GNOME|Applets|Utility</category>
</subject>
<format mime="text/sgml"/>
<identifier url="file:/usr/share/gnome/help/gweather/it/gweather.xml"/>
<language code="it"/>
</resource>
</omf>
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 18055)]
0x40043c53 in __xmlRaiseError (schannel=0, channel=0x8049f9c <fprintf>,
data=0x402b6ee0,
ctx=0x402b6ee0, nod=0x806db10, domain=4, code=504, level=XML_ERR_ERROR,
file=0x0, line=0,
str1=0x80760b8 "resource", str2=0x80760b8 "resource",
str3=0xbfffb810 "(title subject format identifier language )",
int1=-72540026,
int2=-72540026,
msg=0x400f3e60 "Element %s content does not follow the DTD, expecting %s,
got %s\n")
at error.c:453
453 if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax !=
NULL) &&
(gdb) bt
#0 0x40043c53 in __xmlRaiseError (schannel=0, channel=0x8049f9c <fprintf>,
data=0x402b6ee0,
ctx=0x402b6ee0, nod=0x806db10, domain=4, code=504, level=XML_ERR_ERROR,
file=0x0, line=0,
str1=0x80760b8 "resource", str2=0x80760b8 "resource",
str3=0xbfffb810 "(title subject format identifier language )",
int1=-72540026,
int2=-72540026,
msg=0x400f3e60 "Element %s content does not follow the DTD, expecting %s,
got %s\n")
at error.c:453
#1 0x4007174b in xmlErrValidNode (ctxt=0xfbad2086, node=0xfbad2086,
error=-72540026,
msg=0xfbad2086 <Address 0xfbad2086 out of bounds>, str1=0x402b6ee0 "\206
",
str2=0xfbad2086 <Address 0xfbad2086 out of bounds>,
str3=0xbfffb810 "(title subject format identifier language )") at
valid.c:171
#2 0x40078141 in xmlValidateElementContent (ctxt=0x8060cb8, child=0x806db50,
elemDecl=0xbfffb810, warn=1, parent=0x806db10) at valid.c:5129
#3 0x4007931f in xmlValidateOneElement (ctxt=0x8060cb8, doc=0xbfffb810,
elem=0x806db10)
at valid.c:5819
#4 0x40079781 in xmlValidateElement (ctxt=0x8060cb8, doc=0x806d9e0,
elem=0x806db10)
at valid.c:6062
#5 0x40079816 in xmlValidateElement (ctxt=0x8060cb8, doc=0x806d9e0,
elem=0x806da78)
at valid.c:6073
#6 0x40079ce9 in xmlValidateDtd (ctxt=0x8060cb8, doc=0x402b6ee0,
dtd=0x402b6ee0) at valid.c:6278
#7 0x0804b62a in parseAndPrintFile (
filename=0xbffffb3b "/usr/share/omf/gnome-applets/gweather_applet-it.omf",
rectxt=0xbfffb810)
at xmllint.c:1142
#8 0x0804ceaa in main (argc=4, argv=0xbffff9f4) at xmllint.c:1829
After tracking a bit the bug, it appears that there is an API breakage in the
usage of the userData field of the struct _xmlValidCtxt in the
xmlErrValidNode function. This function expects it to be a xmlParserCtxtPtr,
which is obviously not the case.
By the way, there are two "pctxt = ctxt->userData" statements at valid.c:134
and valid.c:135... I suspect something when wrong while editing this file...
Note that I didn't check elsewhere if there were any similar API breakage
(i.e. change in the usage of the userData field) ; I only focused on the
current issue.
If you still need additional information about the issue, just ask.
Mike
--
"I have sampled every language, french is my favorite. Fantastic language,
especially to curse with. Nom de dieu de putain de bordel de merde de
saloperie de connard d'enculé de ta mère. It's like wiping your ass
with silk! I love it." -- The Merovingian, in the Matrix Reloaded
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]