Bug #4642
closed-TP option fails with XQuery
100%
Updated by Michael Kay almost 4 years ago
It's failed at line 16 executing (1 to $number-of-cols) ! <col>{$col-value}</col>
Because the expression (1 to $number-of-cols)
occurs in a loop and is invariant over the loop, it's been bound to a system-allocated local variable, but no slot for this variable has been allocated on the stack.
Updated by Michael Kay almost 4 years ago
It's evaluating variable $m1
(the function call to local:make-rows()
has been inlined. The variable (internally, a GlobalParam
has a null stackframeMap
.
Allocation of slots to local variables happens in GlobalVariable.typeCheck()
, called from Executable.typeCheckGlobalVariables()
. At this the function call has already been inlined, but loop-lifting has not yet taken place, so there are no local variables.
The problem appears to be that the ComponentTracer expression (injected by virtue of the -TP option) is not doing a deep copy during function inlining -- only a shallow copy -- which means that after inlining, a subtree is shared between the original function and the inlined copy, which invalidates slot number allocation.
Updated by Michael Kay almost 4 years ago
- Category set to Diagnostics
- Status changed from New to Resolved
- Priority changed from Low to Normal
- Applies to branch 10, trunk added
- Fix Committed on Branch 10, trunk added
Updated by O'Neil Delpratt over 3 years ago
- % Done changed from 0 to 100
- Fixed in Maintenance Release 10.2 added
Bug fix applied in the Saxon 10.2 maintenance release.
Updated by O'Neil Delpratt over 3 years ago
- Status changed from Resolved to Closed
Please register to edit this issue