Bug #6178
closedTest driver Stack Overflow in eej_xslt30_XT30_bc_ex_test_suite
0%
Description
-s:call-template -t:call-template-1003
java.lang.StackOverflowError
at net.sf.saxon.str.LargeTextBuffer.substring(LargeTextBuffer.java:343)
at net.sf.saxon.tree.tiny.TinyTextImpl.getStringValue(TinyTextImpl.java:50)
at net.sf.saxon.tree.tiny.TinyParentNodeImpl.getStringValue(TinyParentNodeImpl.java:71)
at net.sf.saxon.tree.tiny.TinyTree.getTypedValueOfElement(TinyTree.java:544)
at net.sf.saxon.tree.tiny.TinyElementImpl.atomize(TinyElementImpl.java:110)
at EE_sequence_1210621040173165.process(file:/Volumes/Saxonica/src/w3c/xslt30-test/tests/insn/call-template/call-template-1003.xsl:26)
at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:87)
at com.saxonica.ee.bytecode.ByteCodeCandidate.process(ByteCodeCandidate.java:151)
at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:201)
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:392)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:551)
at EE_sequence_1210621040173165.process(file:/Volumes/Saxonica/src/w3c/xslt30-test/tests/insn/call-template/call-template-1003.xsl:26)
at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:87)
at com.saxonica.ee.bytecode.ByteCodeCandidate.process(ByteCodeCandidate.java:151)
at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:201)
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:392)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:551)
at EE_sequence_1210621040173165.process(file:/Volumes/Saxonica/src/w3c/xslt30-test/tests/insn/call-template/call-template-1003.xsl:26)
...about 170 more stack frames...
at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:87)
at com.saxonica.ee.bytecode.ByteCodeCandidate.process(ByteCodeCandidate.java:151)
at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:201)
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:392)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:551)
at EE_sequence_1210621040173165.process(file:/Volumes/Saxonica/src/w3c/xslt30-test/tests/insn/call-template/call-template-1003.xsl:26)
at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:87)
at com.saxonica.ee.bytecode.ByteCodeCandidate.process(ByteCodeCandidate.java:151)
at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:201)
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:392)
Testing /out = "1 101 201 301 401 501 601 701 801 901 "
Exception in thread "main" java.lang.NullPointerException: value
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
at net.sf.saxon.s9api.XPathSelector.setVariable(XPathSelector.java:107)
at net.sf.saxon.testdriver.TestOutcome.assertXPath(TestOutcome.java:656)
at net.sf.saxon.testdriver.TestOutcome.testAssertion2(TestOutcome.java:384)
at net.sf.saxon.testdriver.TestOutcome.testAssertion(TestOutcome.java:311)
at net.sf.saxon.testdriver.Xslt30TestSuiteDriverHE.runTestCase(Xslt30TestSuiteDriverHE.java:579)
at net.sf.saxon.testdriver.TestDriver.lambda$processTestSet$2(TestDriver.java:757)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at net.sf.saxon.s9api.streams.XdmStream.forEach(XdmStream.java:360)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at net.sf.saxon.s9api.streams.XdmStream.forEach(XdmStream.java:360)
at net.sf.saxon.testdriver.TestDriver.processTestSet(TestDriver.java:751)
at net.sf.saxon.testdriver.TestDriver.processCatalog(TestDriver.java:394)
at net.sf.saxon.testdriver.TestDriver.go(TestDriver.java:259)
at com.saxonica.testdriver.Xslt30TestSuiteDriverPE.go(Xslt30TestSuiteDriverPE.java:54)
at com.saxonica.testdriver.Xslt30TestSuiteDriverEE.main(Xslt30TestSuiteDriverEE.java:46)
Updated by Michael Kay 8 months ago
The test case call-template-1003 was added to test for bug #5845, which was raised as a 12.x-specific bug in elaboration code; but it appears that bytecode generation in 11.x could not handle this case either.
Updated by Michael Kay 8 months ago
- Subject changed from Test driver NPE in eej_xslt30_XT30_bc_ex_test_suite to Test driver Stack Overflow in eej_xslt30_XT30_bc_ex_test_suite
- Status changed from New to Closed
The NPE is a secondary error while evaluating assertions after the Stack Overflow crash.
The Stack Overflow is probably deep recursion rather than infinite recursion; we're failing to do tail call optimisation in this particular case. In a sense, therefore, this isn't a bug, just a missed opportunity for optimisation. Since it's only a problem with bytecode generation, which is dropped in 12.x anyway, and since it was found internally rather than being reported by a user, we'll close it with no action.
Please register to edit this issue