Project

Profile

Help

Bug #5888

closed

NPE in LoopLifter: corruption in expression tree for sum() function call

Added by Michael Kay over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2023-02-22
Due date:
% Done:

100%

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

Description

Reported by Mark Pierce.

An NPE occurs in LoopLifter when processing a template containing two rather complex calls on sum().

java.lang.NullPointerException: Cannot read field "dependees" because "parentInfo" is null
    at net.sf.saxon.expr.parser.LoopLifter.markDependencies(LoopLifter.java:221)
    at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:171)
    at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:174)
    at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:174)

Debugging reveals that both calls on sum() share the same operand object for the defaulted second argument (literal integer 0), so the parent pointer on one of these instances is necessarily wrong.

Please register to edit this issue

Also available in: Atom PDF