Re: [xml] xmllint --shell dumps core
- From: Justin Fletcher <justin fletcher ntlworld com>
- To: xml gnome org
- Subject: Re: [xml] xmllint --shell dumps core
- Date: Wed, 07 Nov 2001 12:38:02 GMT
In message <3BE91D72 8070800 wiredminds de>
Heiko Rupp <heiko rupp WiredMinds de> wrote:
Input file:
<personen>
<person name="foo">
<street>...</street>
</person>
<person name="bar">
<street>...</street>
</person>
</personen>
$ xmllint --shell
/ > cd /personen
/personen is a 0 Node Set
/ > cd /personen/person
Program received signal SIGSEGV, Segmentation fault.
0x4006c493 in xmlShell (doc=0x806cab8, filename=0xbffff9a2 "table.xml",
input=0x8049e10 <xmlShellReadline>, output=0x402095e0) at
debugXML.c:2113
2113 if (list->nodesetval->nodeNr == 1) {
(gdb) p list
$1 = 0x805d410
(gdb) p *list
$2 = {type = XPATH_NODESET, nodesetval = 0x0, boolval = 0, floatval = 0,
stringval = 0x0, user = 0x0, index = 0, user2 = 0x0, index2 = 0}
(gdb) bt
#0 0x4006c493 in xmlShell (doc=0x806cab8, filename=0xbffff9a2 "table.xml",
input=0x8049e10 <xmlShellReadline>, output=0x402095e0) at
debugXML.c:2113
#1 0x804a52d in parseAndPrintFile (filename=0xbffff9a2 "table.xml")
at xmllint.c:624
#2 0x804b81b in main (argc=3, argv=0xbffff7ec) at xmllint.c:1072
#3 0x40110c6f in __libc_start_main () from /lib/libc.so.6
(gdb) q
Same happens for
cd /personen/person[ name="bar"]
The attached diff (against 2.4.8) prevents the core dump, but is
certainly not the correct solution.
No abort occurs here, but I do get a silly response when I typo'd :
* xmllint -shell test.xml
/ > cd /personen
personen > cd personen/person
personen/person is a -442502132 Node Set
personen >
-442502132 = 0xe59ff40c = value stored in address 0x0 through to 0x18,
therefore I believe a NULL dereference is taking place, which agrees
with the diff you sent.
[This test run with 2.4.9]
--
Gerph {djf0-.3w6e2w2.226,6q6w2q2,2.3,2m4}
URL: http://www.movspclr.co.uk/
... Eyes to the heavens, screaming at the sky;
Trying to send you messages, but choking on goodbye.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]