diff options
| author | Ulrik Sverdrup <root@localhost> | 2015-04-27 13:27:24 +0200 |
|---|---|---|
| committer | Ulrik Sverdrup <root@localhost> | 2015-04-27 21:14:43 +0200 |
| commit | 95be21df477655131627def1943de73922b1f6a4 (patch) | |
| tree | 65e6126c8f3c6783d797b2c3a87ddf37ca2d902a /src/libstd/array.rs | |
| parent | f191f924214aa1dcd342ada1d99775ccbb01ddd7 (diff) | |
| download | rust-95be21df477655131627def1943de73922b1f6a4.tar.gz rust-95be21df477655131627def1943de73922b1f6a4.zip | |
core: Fix size_hint for signed integer Range<T> iterators
There was an overflow bug in .size_hint() for signed iterators, which produced an hilariously incorrect size or an overflow panic. Incorrect size is a serious bug since the iterators are marked ExactSizeIterator. (And leads to abort() on (-1i8..127).collect() when the collection tries to preallocate too much). All signed range iterators were affected. > (-1i8..127).size_hint() (18446744073709551488, Some(18446744073709551488)) Bug found using quickcheck. Fixes #24851
Diffstat (limited to 'src/libstd/array.rs')
0 files changed, 0 insertions, 0 deletions
