Project

Profile

Help

Bug #4502

closed

StackOverflowError on Saxon 10.0

Added by Gunther Rademacher about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Sprint/Milestone:
-
Start date:
2020-03-26
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, 9.9
Fix Committed on Branch:
10, 9.9
Fixed in Maintenance Release:
Platforms:

Description

The attached ast-to-ebnf.xq is a piece of code from REx grammar tools. It is used when converting a grammar from XML representation back to textual EBNF for different contexts.

Since Saxon 10.0, this code results in a StackOverflowError as shown in attachment stacktrace.log. As far as I can see, this is not related to problems with tail call optimization. The -explain output shows that function b:break-lines has been recognized as tail-recursive. However the stack trace suggests that subList chains may be causing the problem.

It can be reproduced using this command line (not always, but most of the time):

java net.sf.saxon.Query ast-to-ebnf.xq -s:rendered-items.xml 2>stacktrace.log

Files

stacktrace.log (57.1 KB) stacktrace.log Gunther Rademacher, 2020-03-26 20:41
ast-to-ebnf.xq (5.02 KB) ast-to-ebnf.xq Gunther Rademacher, 2020-03-26 20:41
rendered-items.xml (74.1 KB) rendered-items.xml Gunther Rademacher, 2020-03-26 20:41

Please register to edit this issue

Also available in: Atom PDF