GNOME Bugzilla – Bug 58878
explicit "child" axis not recognised in XPath expressions
Last modified: 2009-08-15 18:40:50 UTC
Explicit use of the child axis in the XSLT stylesheet below causes a SIGSEGV with xsltproc built from libxslt-1.0.1-1.src.rpm. The XSLT stylesheet (problem.xsl), a sample XML document (problem.xml), and a backtrace appear below. With those files, the following command illustrates the problem: $ xsltproc problem.xsl problem.xml Segmentation fault (core dumped) I have looked through the function xsltCompileStepPattern in libxslt/pattern.c and suspect that something has gone wrong by the time the function xsltGetQNameURI is called on line 1269. =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:preserve-space elements="*"/> <xsl:output method="xml"/> <xsl:template match="child::foo"> <bar/> </xsl:template> </xsl:stylesheet> =================================================================== =================================================================== <?xml version="1.0"?> <foo/> =================================================================== ===================================================================
+ Trace 8364
Okay, I have tried to fix it in CVS, seems to be working now: orchis:~/XSLT/tests/general -> cat bug-55.xsl <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:preserve-space elements="*"/> <xsl:output method="xml"/> <xsl:template match="child::foo"> <bar/> </xsl:template> </xsl:stylesheet> orchis:~/XSLT/tests/general -> cat ../docs/bug-55.xml <?xml version="1.0"?> <foo/> orchis:~/XSLT/tests/general -> xsltproc bug-55.xsl ../docs/bug-55.xml <?xml version="1.0"?> <bar/> orchis:~/XSLT/tests/general -> http://cvs.gnome.org/bonsai/cvsquery.cgi?module=libxslt&branch=HEAD&branchtype=match&dir=libxslt&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=08%2F14%2F01+09%3A34&maxdate=08%2F14%2F01+09%3A36&cvsroot=%2Fcvs%2Fgnome thanks for the report ! Daniel
Should be closed by the 2.4.2/1.0.2 releases, thanks for the bug report ! Daniel