Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer overflow in __reduce__ of the range iterator #89193

Closed
serhiy-storchaka opened this issue Aug 27, 2021 · 4 comments
Closed

Integer overflow in __reduce__ of the range iterator #89193

serhiy-storchaka opened this issue Aug 27, 2021 · 4 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 45030
Nosy @rhettinger, @serhiy-storchaka, @miss-islington
PRs
  • bpo-45030: Fix integer overflow in __reduce__ of the range iterator #28000
  • [3.10] bpo-45030: Fix integer overflow in __reduce__ of the range iterator (GH-28000) #28160
  • [3.9] bpo-45030: Fix integer overflow in __reduce__ of the range iterator (GH-28000) #28161
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-09-04.20:40:18.878>
    created_at = <Date 2021-08-27.14:47:06.991>
    labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
    title = 'Integer overflow in __reduce__ of the range iterator'
    updated_at = <Date 2021-09-04.20:40:18.878>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2021-09-04.20:40:18.878>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-09-04.20:40:18.878>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2021-08-27.14:47:06.991>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45030
    keywords = ['patch']
    message_count = 4.0
    messages = ['400428', '401051', '401058', '401059']
    nosy_count = 3.0
    nosy_names = ['rhettinger', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['28000', '28160', '28161']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45030'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @serhiy-storchaka
    Copy link
    Member Author

    >>> 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)
    []

    @serhiy-storchaka serhiy-storchaka added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Aug 27, 2021
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 936f6a1 by Serhiy Storchaka in branch 'main':
    bpo-45030: Fix integer overflow in __reduce__ of the range iterator (GH-28000)
    936f6a1

    @miss-islington
    Copy link
    Contributor

    New changeset ed9f927 by Miss Islington (bot) in branch '3.10':
    bpo-45030: Fix integer overflow in __reduce__ of the range iterator (GH-28000)
    ed9f927

    @miss-islington
    Copy link
    Contributor

    New changeset fecd17f by Miss Islington (bot) in branch '3.9':
    bpo-45030: Fix integer overflow in __reduce__ of the range iterator (GH-28000)
    fecd17f

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants