[xslt] Infinite recursion via func:function seg faults
- From: Mark Howe <mvah cyberporte com>
- To: xslt gnome org
- Subject: [xslt] Infinite recursion via func:function seg faults
- Date: Wed, 01 Apr 2009 11:10:30 +0200
Hi,
Here's the stylesheet:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:func="http://exslt.org/functions"
xmlns:abc="abc"
extension-element-prefixes="func abc">
<xsl:template match="/">
<test>
<xsl:value-of select="abc:bad_test()"/>
<!-- <xsl:call-template name="abc:bad_test"/> -->
</test>
</xsl:template>
<func:function name="abc:bad_test">
<xsl:param name="length"/>
<func:result>
<xsl:value-of select="abc:bad_test()"/>
</func:result>
</func:function>
<xsl:template name="abc:bad_test">
<xsl:param name="length"/>
<xsl:call-template name="abc:bad_test"/>
</xsl:template>
</xsl:stylesheet>
If I call it against itself using xsltproc I get a seg fault. If I
comment out
<xsl:value-of select="abc:bad_test()"/>
and uncomment
<xsl:call-template name="abc:bad_test"/>
I get
runtime error: file xteriorize/xcathedra/bad_test.xsl line 25 element
param xsltApplyXSLTTemplate: A potential infinite template recursion was
detected.
etc. I deduce from this that there is no deep recursion test (or indeed
stack overflow) checking on func:function-type recursion.
Obviously the error is in my application code, but it would be extremely
helpful if LibXSLT could say something more informative than
'segmentation fault' in response.
Regards,
Mark
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]