GNOME Bugzilla – Bug 139132
Segmentation fault in libxslt-1.1.5 on FreeBSD 4.9
Last modified: 2009-08-15 18:40:50 UTC
On simple transformation xsltproc Segmentation fault. src1.xml =============== <?xml version="1.0" encoding="windows-1251"?> <!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Victor Prylipko (Linia) --> <root> <colls COL_COD="PT" COL_NAME="Арго" CURR_ID_0="" CURR_ID_1="" CURR_ID_2="" CURR_ID_3=""> <goodcoll CODE="2655" ART="PA310ST" NAME="Комплект стекол для А310 тон" WEIGHT="10" VOLUME="0.09" GABS_W="72" GABS_H="112" GABS_D="0.4" SH_DESC="" SUPP_ART="PA310ST" NUM="0" COL_COD="PT" IMAGE_="/images/goods/image/PA310ST.gif" SCHEMA_="/images/goods/schema/PA310ST.gif"> <currency CURRENCY_="RUR" OPT="1" ROZN="2" ZAKUP="3" IN="4"/> <currency CURRENCY_="USD" OPT="2" ROZN="3" ZAKUP="4" IN="5"/> <goodcomb GOOD_ID="63647" NUM_COLOR="0" COL_ID="24007" TITLE="пустой" COEF="0" ABS_COEF="0" RU_CODE="" EN_CODE="" PROPNAME_="C" MODEL_=""> <ost NUM_TIP="0" TIP="0"/> <ost NUM_TIP="2" TIP="-3"/> <ost NUM_TIP="4" TIP="-4"/> <ost NUM_TIP="5" TIP="-4"/> <ost NUM_TIP="6" TIP="-4"/> <ost NUM_TIP="7" TIP="-3"/> <ost NUM_TIP="8" TIP="-3"/> <ost NUM_TIP="9" TIP="-3"/> </goodcomb> </goodcoll> </colls> </root> =============== empty_color_en_code.xsl =============== <?xml version="1.0" encoding="windows-1251"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="windows-1251" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:key name="EMPTY_EN_CODE_COLLS" match="/root/colls/goodcoll/goodcomb/@COL_ID [../@EN_CODE = '']" use="../../../@COL_COD"/> <xsl:key name="EMPTY_EN_CODE_COLRS" match="/root/colls/goodcoll/goodcomb/@COL_ID [../@EN_CODE = '']" use="concat(.,':',../../../@COL_COD)"/> <xsl:template match="/"> <root> <xsl:for-each select="/root/colls[key('EMPTY_EN_CODE_COLLS',@COL_COD)]"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:for-each select="key('EMPTY_EN_CODE_COLLS',@COL_COD)[generate-id(.) = generate-id(key('EMPTY_EN_CODE_COLRS',concat(.,':',../../../@COL_COD)))]"> <color> <xsl:copy-of select="../@TITLE | ../@RU_CODE | ."/> </color> </xsl:for-each> </xsl:copy> </xsl:for-each> </root> </xsl:template> </xsl:stylesheet> =============== root@des-free#xsltproc empty_color_en_code.xsl src1.xml Segmentation fault (core dumped) Press any key to continue... root@des-free#uname -a FreeBSD des-free.lini-a.ru 4.9-20040227-STABLE FreeBSD 4.9-20040227-STABLE #0: Sat Feb 28 00:08:18 GMT 2004 root@vic-free.lini- a.ru:/usr/obj/usr/src/sys/GENERIC i386 libxslt-1.1.5 installed from FreeBSD ports collection. Same command with libxslt-1.1.4 - working good with result of transformation: ================= <?xml version="1.0" encoding="windows-1251"?> <root> <colls COL_COD="PT" COL_NAME="Арго" CURR_ID_0="" CURR_ID_1="" CURR_ID_2="" CURR_ID_3=""> <color COL_ID="24007" TITLE="пустой" RU_CODE=""/> </colls> </root> =================
Dohh, a double cut and paste error :-( Should be fixed in CVS now thanks for the report, I added the test to the regression suite, Daniel
This should be closed by release 1.1.6, thanks, Daniel