#1021 Optimizer bug causing internal error

v9.2
closed
Michael Kay
5
2012-10-08
2009-12-11
Michael Kay
No

Symptom: "*** Internal Saxon error: local variable encountered whose binding has been deleted ", with a variable name such as saxon:dot1111763.

The problem is caused by an optimizer rewrite that extracts subexpressions dependent on the context item from the "return" clause of a "for" expression in XPath or XQuery. The optimizer rewrite fails to reset the cached properties of all containing expressions affected by the change, with the effect that a subsequent optimization on the same part of the tree is misled into thinking that such an expression has no dependencies on local variables. This can cause a variable reference within the subtree to remain in the subtree when the corresponding declaration is removed on the false assumption that it is unreferenced.

A patch is being raised: affects method factorOutDot() in module ExpressionTool, in the 9.2 branch only.

Discussion

  • Michael Kay
    Michael Kay
    2010-01-27

    Fixed in 9.2.0.5