Bug #1600
closedIncorrect optimization of global variables in XSLT
100%
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
Please register to edit this issue