Project

Profile

Help

Bug #2793

closed

Tail call of function in used package drops component information

Added by Michael Kay almost 8 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT 3.0 packages
Sprint/Milestone:
-
Start date:
2016-06-13
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7, trunk
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
Platforms:

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

Actions #1

Updated by Michael Kay almost 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.

Actions #2

Updated by Michael Kay almost 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.

Actions #3

Updated by Michael Kay almost 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.)

Actions #4

Updated by O'Neil Delpratt almost 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.

Actions #5

Updated by O'Neil Delpratt almost 7 years ago

  • Applies to branch trunk added
  • Applies to branch deleted (9.8)
Actions #6

Updated by O'Neil Delpratt almost 7 years ago

  • Fix Committed on Branch trunk added
  • Fix Committed on Branch deleted (9.8)

Please register to edit this issue

Also available in: Atom PDF