Project

Profile

Help

Bug #1600

closed

Incorrect optimization of global variables in XSLT

Added by Michael Kay over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2012-08-03
Due date:
% Done:

100%

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

Description

A problem has been found with optimization of global variables in XSLT. The symptom might be a NullPointerException, or perhaps

java.lang.ArrayIndexOutOfBoundsException: Local variable has not been allocated a stack frame slot

The only external factor that is characteristic of the problem is that the initializer of the global variable contains a filter expression or other looping construct.

Internally, the problem occurs when there is more than one phase of optimization that improves the initialization expression, and where the first such phase creates a new expression that binds local variables. The code that allocates a stackframe for computing the global variable decides on the basis of the old (unoptimized) expression that no stackframe slots are needed.

A patch has been developed and tested for the 9.4 branch. The relevant code for the development branch has been refactored; the problem is present but a fix has not yet been identified. Test case attached.


Files

source.xml (260 Bytes) source.xml Michael Kay, 2012-08-03 14:08
style.xsl (1.11 KB) style.xsl Michael Kay, 2012-08-03 14:08
Actions #1

Updated by Michael Kay over 11 years ago

Actions #2

Updated by Michael Kay over 11 years ago

  • Status changed from In Progress to Resolved

The bug on the devepment branch was unrelated and has now been fixed.

Actions #3

Updated by O'Neil Delpratt over 11 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.4.0.6

Please register to edit this issue

Also available in: Atom PDF