Project

Profile

Help

Bug #1746

ProgressiveIterator.materialize()

Added by Michael Kay about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2013-04-25
Due date:
% Done:

100%

Spent time:
-
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
9.5
Fixed in version:
9.5.0.2

Description

The code in MemoClosure.ProgressiveIterator.materialize() does this:

new SequenceExtent(reservoir)

which is clearly wrong because the reservoir may contain unused entries, even if condense() has been called. Although we don't have a test case to prove it, there is circumstantial evidence that this is resulting in count() returning 50 (the initial size of the reservoir) when applied to a sequence which is actually shorter than 50.

The code should be the same as in MemoClosure.materialize(), namely

new SequenceExtent(reservoir, 0, used)

Oddly the incorrect code is present in 9.4 as well as 9.5 but there is no evidence that it has ever caused any problems. However, it is so obviously wrong that I am going to patch it for both releases.

History

#1 Updated by Michael Kay about 3 years ago

  • Status changed from In Progress to Resolved

Patch applied to 9.4, 9.5, and 9.6 branches.

#2 Updated by O'Neil Delpratt almost 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.5.0.2

Also available in: Atom PDF