Project

Profile

Help

Bug #1746

closed

ProgressiveIterator.materialize()

Added by Michael Kay almost 11 years ago. Updated almost 11 years ago.

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

100%

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

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.

Actions #1

Updated by Michael Kay almost 11 years ago

  • Status changed from In Progress to Resolved

Patch applied to 9.4, 9.5, and 9.6 branches.

Actions #2

Updated by O'Neil Delpratt almost 11 years ago

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

Please register to edit this issue

Also available in: Atom PDF