segfault with XPath expression with unknown namespace and nested function calls
Bug #1009118 reported by
Kovid Goyal
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libxml2 |
Triaged
|
Critical
|
Unassigned | ||
lxml |
Fix Released
|
Critical
|
Unassigned |
Bug Description
The following test snippet causes a segfault:
python -c "from lxml import etree; etree.fromstrin
Removing either normalize-space or concat causes an XPathEvalError to be raised, which is much friendlier than a segfault. I guess that maybe the exception is not being handled properly in concat().
Python : sys.version_
lxml.etree : (2, 3, 4, 0)
libxml used : (2, 8, 0)
libxml compiled : (2, 8, 0)
libxslt used : (1, 1, 26)
linux, 64-bit (gentoo)
To post a comment you must log in.
Sorry I pasted the wrong test case to reproduce the crash. The correct test case is:
python -c "from lxml import etree; etree.fromstrin g('<r>< a/></r> ').xpath( '''*[concat( ' ', normalize- space(@ xxx:type) , ' ')='y']''')"