GNOME Bugzilla – Bug 382771
Expression exsl:node-set('')/node causes segfault
Last modified: 2006-12-07 18:19:08 UTC
Steps to reproduce: Run "xsltproc crash.xsl dummy.xml" using the attached files Stack trace: nik@druid:~/libxml-crash> gdb xsltproc GNU gdb 5.2.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-suse-linux"... (gdb) run crash.xsl dummy.xml Starting program: /usr/local/bin/xsltproc crash.xsl dummy.xml [New Thread 1024 (LWP 23036)] Program received signal SIGSEGV, Segmentation fault.
+ Trace 91879
Thread 1024 (LWP 23036)
Other information: I'm using libxslt 1.1.17 and libxml2 2.6.27. This didn't crash with a previous version, but I don't know since when exactly.
Created attachment 77759 [details] XSL file that produces a segfault
Created attachment 77760 [details] Empty XML file for the test case
Simply removing lines 12435 and 12436 from xpath.c (libxml2 2.6.27) seems to work. The comment there also looks a bit scary.
Could you please try with the latest CVS (both libxml and libxslt)? Your testfiles seem to work ok for me.
I tried libxslt 1.1.19 and it doesn't crash with that version.
Excellent - but there is also one additional fix in CVS (libxslt) which may also affect this. That fix will be included in 1.1.20 when it is released in the near future. I'm closing this report as "fixed".