Actions
Bug #392
closedsaxon:evaluate with variables corrupts the caller's stack
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Legacy ID:
sf-914497
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
SourceForge user: mhkay
When saxon:evaluate() is called to evaluate an
expression that contains local variables (possibly local
varaibles added to the expression by the optimizer), the
values of these variables corrupt variables on the stack
frame of the template or function from which
saxon:evaluate was called.
I've fixed the problem. In Evaluate.java, change line 152
to
return pexpr.expression.iterate(newContext(c));
and line 135 to
return pexpr.expression.evaluateItem(newContext(c));
and add the method:
private XPathContext newContext(XPathContext old)
{
old.getController().getBindery().openStackFrame();
return old.getController().newXPathContext();
}
Please register to edit this issue
Actions