[New-bugs-announce] [issue45030] Integer overflow in __reduce__ of the range iterator

Serhiy Storchaka report at bugs.python.org
Fri Aug 27 10:47:07 EDT 2021


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

>>> it = iter(range(2**63-10, 2**63-1, 10))
>>> it.__reduce__()
(<built-in function iter>, (range(9223372036854775798, -9223372036854775808, 10),), 0)
>>> import pickle
>>> it2 = pickle.loads(pickle.dumps(it))
>>> list(it)
[9223372036854775798]
>>> list(it2)
[]

----------
components: Library (Lib)
messages: 400428
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Integer overflow in __reduce__ of the range iterator
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45030>
_______________________________________


More information about the New-bugs-announce mailing list