Project

Profile

Help

Bug #4851

A compiled SEF package containing a CoercedFunction cannot be loaded by Saxon-PE

Added by Michael Kay 5 months ago. Updated 7 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT export
Sprint/Milestone:
-
Start date:
2020-12-04
Due date:
% Done:

100%

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

Description

A compiled SEF package containing a CoercedFunction cannot be loaded by Saxon-PE. This dates back to when Saxon-HE didn't support higher-order functions.

History

#1 Updated by Michael Kay 5 months ago

  • Status changed from New to In Progress

I transferred the code handling coercedFn from PackageLoaderPE to PackageLoaderHE, but it fails with an AssertionError because the function being coerced is a map.

Fixed this by changing the test (still in PackageLoaderHE/"coercedFn") from target instanceof FunctionLiteral to target instanceof Literal.

It now gets further, but fails later on saying

The items on the LHS of the '?' operator must be maps or arrays; but value (coerced map) was supplied. This is a user error; and it turns out that the original failure was triggered by the same user error, but I'm pretty sure it could also be triggered by correct code.

#2 Updated by Michael Kay 5 months ago

I'm confident that moving the existing code into Saxon-HE is the right solution, it's been tested in an ad-hoc way on the development branch, and I shall make the same fix on the 10.0 branch. The conditions that led to it are not easy to reproduce in a simple test case.

#3 Updated by Michael Kay 5 months ago

  • Status changed from In Progress to Resolved
  • Applies to branch 10, trunk added
  • Fix Committed on Branch 10, trunk added

#4 Updated by O'Neil Delpratt 7 days ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 10.5 added

Bug fix applied to Saxon 10.5 maintenance release.

Please register to edit this issue

Also available in: Atom PDF