Stripping whitespace from an XSL transformation crashes in libxslt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libxslt |
New
|
Undecided
|
Unassigned | ||
lxml |
Confirmed
|
High
|
scoder |
Bug Description
pepe@celia:~$ python crash/crashme.py
lxml.etree: (2, 2, 6, u'crash')
libxml used: (2, 7, 6)
libxml compiled: (2, 7, 6)
libxslt used: (1, 1, 22)
libxslt compiled: (1, 1, 22)
Doing XSL from the TOP
Parsed form, got <lxml.etree.
........
........
........
Doing XSL from the TARGET
Segmentation fault (core dumped)
$
crash/crashme.py is:
import lxml
import lxml.etree
from lxml.etree import Element, ElementTree, tostring
def process(path, add=True, xslFromTop=False):
doc = lxml.etree.
target = doc.xpath(path)[0]
xslt_doc = lxml.etree.
transform = lxml.etree.
if xslFromTop:
xslresult = transform(
else:
xslresult = transform(
return xslresult, doc
if __name__ == "__main__":
print "lxml.etree: ", lxml.etree.
print "libxml used: ", lxml.etree.
print "libxml compiled: ", lxml.etree.
print "libxslt used: ", lxml.etree.
print "libxslt compiled: ", lxml.etree.
for i in range(0,10):
doc = lxml.etree.
print "Parsed form, got %s " % doc
print "Doing XSL from the TOP"
print process(
print "Doing XSL from the TARGET"
print process(
print "Finished"
pepe@celia:~$ uname -a
Linux celia 2.6.22.
pepe@celia:~$ python --version
Python 2.5.4
Changed in libxslt: | |
status: | Unknown → New |
summary: |
- Applying an XSL transformation from a non-root XML element crashes + Stripping whitespace from an XSL transformation crashes in libxslt |
Changed in libxslt: | |
importance: | Unknown → Critical |
Changed in libxslt: | |
status: | New → Confirmed |
Changed in lxml: | |
status: | Confirmed → Fix Committed |
tags: | added: guanlonghuang |
Changed in lxml: | |
status: | Fix Committed → Confirmed |
tags: | removed: guanlonghuang |
> doc = lxml.etree. parse(" data/form. xml") parse(open( "static/ form.xsl" ))
> xslt_doc = lxml.etree.
Could you provide these two files so that I can test it here?
Thanks,
Stefan