Project

Profile

Help

Bug #3211

closed

ArrayIndexOutOfBoundsException in ARegexIterator.computeNestingTable with complex regex

Added by Henry S Thompson over 7 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2017-04-26
Due date:
% Done:

100%

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

Description

Some combination of nesting and non-capturing groups is the cause. Test case attached -- just run it with empty input.

The 7th branch is the problem, simplifying it in a variety of ways makes the problem go away.

For testing purposes, you can pass in simplified patterns and/or formulae from the command line, so e.g. this, with one fewer non-capturing group, works:

saxon97 test.xsl pat='("[^"]*")|(\{[^}]+})|(,)|([^=\-+*/();:,.$<>^!]+(?:\.[^=\-+*/();:,.$<>^!]+)*\()|([)])|(^=|\()|((?:(?:'\''[^'\'']+'\'')))|(\$?[A-Z]+\$?[0-9]+)|([a-zA-Z_\\][a-zA-Z0-9._]*)|(.)'

Files

test.xsl (730 Bytes) test.xsl Test case Henry S Thompson, 2017-04-26 11:43

Please register to edit this issue

Also available in: Atom PDF