Bug #1746
closedProgressiveIterator.materialize()
100%
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.
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.
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