Bug #4108
closedSaxon-EE crashes when optimizing stylesheet with "too many" user functions
100%
Description
When Saxon-EE tries to optimize an xslt with "too many" user functions, it gives the following crash:
Exception in thread "main" java.lang.AssertionError at net.sf.saxon.expr.Operand.setChildExpression(Operand.java:74) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:382) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at net.sf.saxon.expr.SingletonAtomizer.simplify(SingletonAtomizer.java:70) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:381) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:381) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:381) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:381) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:381) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at net.sf.saxon.expr.FilterExpression.simplify(FilterExpression.java:203) at net.sf.saxon.expr.ItemChecker.simplify(ItemChecker.java:86) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:381) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:381) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:381) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at net.sf.saxon.expr.Expression.simplifyChildren(Expression.java:381) at net.sf.saxon.expr.Expression.simplify(Expression.java:363) at com.saxonica.ee.optim.OptimizerEE.tryInlineFunctionCall(OptimizerEE.java:1142) at net.sf.saxon.expr.UserFunctionCall.optimize(UserFunctionCall.java:406) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.SlashExpression.optimize(SlashExpression.java:349) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.sort.DocumentSorter.optimize(DocumentSorter.java:102) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.UnaryExpression.optimize(UnaryExpression.java:102) at net.sf.saxon.expr.Atomizer.optimize(Atomizer.java:236) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617) at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236) at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:341) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617) at net.sf.saxon.expr.instruct.Block.optimize(Block.java:658) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:353) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.instruct.ForEach.optimize(ForEach.java:297) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617) at net.sf.saxon.expr.instruct.Block.optimize(Block.java:658) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:353) at net.sf.saxon.expr.Operand.optimize(Operand.java:206) at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617) at net.sf.saxon.expr.instruct.ParentNodeConstructor.optimize(ParentNodeConstructor.java:221) at net.sf.saxon.expr.instruct.FixedElement.optimize(FixedElement.java:102) at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201) at com.saxonica.ee.trans.TemplateRuleInitializer.init(TemplateRuleInitializer.java:63) at com.saxonica.ee.trans.TemplateRuleEE.initialize(TemplateRuleEE.java:85) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:496) at net.sf.saxon.trans.rules.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:71) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:482) at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:733) at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:347) at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:311) at net.sf.saxon.Transform.processFile(Transform.java:1276) at net.sf.saxon.Transform.doTransform(Transform.java:804) at net.sf.saxon.Transform.main(Transform.java:80)
I'll upload a small test set still giving the problem. The xslt is part of an application checking the quality of export files. I removed the content of some functions not being used in this check, but needed by other checks.
There is no problem with saxon-he-9.9.1.1 or saxon-ee-9.8.0.15.
Files
Please register to edit this issue