Bug #2793
closedTail call of function in used package drops component information
100%
Description
If a package A contains a call to a function F in package B, and function F directly or indirectly invokes a function call on another function G as a tail call, then in G, the context incorrectly identifies the current component as F(B) rather than F(A), so that when G directly or indirectly calls a function H that appears in B but is overridden in A, it is H(B) that is called rather than H(A).
Test case override-f-026 demonstrates the problem
Updated by Michael Kay over 8 years ago
- Status changed from New to Resolved
- Fix Committed on Branch 9.7, 9.8 added
Fixed: the tailCallFunction placed in the context when a tail call is encountered needs to be a Component object rather than a UserFunction object, so it retains information about the current package.
Updated by Michael Kay over 8 years ago
- Status changed from Resolved to In Progress
Reopened.
The patch breaks tail-calls in XQuery, e.g. test case (-s:prod-AxisStep -t:Axes089), because functions in XQuery do not have a declaring component.
Updated by Michael Kay over 8 years ago
- Status changed from In Progress to Resolved
A revised patch has been committed, introducing more flexibility into the way tail call data is held in the context.
(Note, the commit message mentioned the wrong bug number.)
Updated by O'Neil Delpratt over 8 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.6 added
Bug fixed in maintenance release 9.7.0.6.
Updated by O'Neil Delpratt over 7 years ago
- Applies to branch trunk added
- Applies to branch deleted (
9.8)
Updated by O'Neil Delpratt over 7 years ago
- Fix Committed on Branch trunk added
- Fix Committed on Branch deleted (
9.8)
Please register to edit this issue