[lxml-dev] trunk schematron tests core dump (was: annotate, pyannotate, xsiannotate)
jholg at gmx.de
jholg at gmx.de
Tue Oct 2 17:58:52 CEST 2007
Hi,
> > > Schematron uses XPath a lot, so I wouldn't be surprised if this was
> > > related to
> > > the XPath bug in libxml2 2.6.27. Is there any chance you could switch
> to
> [...]
> Unfortunately, using the latest & greatest libxml2/libxslt (2.6.33/1.1.22)
> doesn't solve the problem for me.
I'm trying to get some sensible information but have real problems with debugging, as I'm seeing line number information that is just plain wrong, though compiling with debugging on and everything, the likes of:
(gdb) info source
Current source file is src/lxml/etree.c
Compilation directory is /home/lb54320/pydev/LXML/lxml/
Located in /home/lb54320/pydev/LXML/lxml/src/lxml/etree.c
Contains 90795 lines.
Source language is c.
Compiled with stabs debugging format.
(gdb) b etree.c:70850
No line 70850 in file "src/lxml/etree.c".
(gdb)
No idea what I'm doing wrong here, at the moment.
So the info on the crash does not get much better than that backtrace at the moment:
Program received signal SIGSEGV, Segmentation fault.
0xff0b3218 in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xff0b3218 in strlen () from /usr/lib/libc.so.1
#1 0xff106530 in _doprnt () from /usr/lib/libc.so.1
#2 0xff108730 in vsnprintf () from /usr/lib/libc.so.1
#3 0xfe23df04 in __xmlRaiseError () from /apps/pydev/debug/dmalloc/lib//libxml2.so.2
#4 0xfe3e717c in xmlSchematronPErr () from /apps/pydev/debug/dmalloc/lib//libxml2.so.2
#5 0xfe3e9878 in xmlSchematronParse () from /apps/pydev/debug/dmalloc/lib//libxml2.so.2
#6 0xfe68dfdc in __pyx_f_5etree_10Schematron___init__ (__pyx_v_self=0x1b30f0,
__pyx_args=0x1db670, __pyx_kwds=0x0) at src/lxml/etree.c:5663
What I can see, though, is that using the same schematron schema with xmllint does not crash:
0 $ cat invalid_empty.xst
<schema xmlns="http://purl.oclc.org/dsdl/schematron" />
0 $ python2.4 -i -c 'from lxml import etree; print etree.LIBXML_VERSION; schema = etree.Schematron(etree.parse("invalid_empty.xst"))'
(2, 6, 30)
Segmentation Fault (core dumped)
whereas
$ /apps/pydev/bin/xmllint --schematron invalid_empty.xst foo.xml --version
/apps/pydev/bin/xmllint: using libxml version 20630
compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib
invalid_empty.xst:1: element schema: Schemas parser error : The schematron document 'invalid_empty.xst' has no pattern
Schematron schema invalid_empty.xst failed to compile
<?xml version="1.0"?>
<root/>
Holger
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
More information about the lxml-dev
mailing list