Skip to content

Assertion failure in Objects/rangeobject.c compute_range_length: Assertion PyLong_Check(start)' failed #141312

Closed

Description

@YuanchengJiang

Bug report

Bug description:

import pickle

for proto in range(pickle.HIGHEST_PROTOCOL + 1):
    it = iter(range(0x80000000 ** 32 + -(2**15)))
    it.__setstate__(2 ** -(2**15) + 1)
    d = pickle.dumps(it, proto)
python: ../Objects/rangeobject.c:243: compute_range_length: Assertion `PyLong_Check(start)' failed.
Aborted (core dumped)

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. sergey-miryanov commented on Nov 9, 2025

    @sergey-miryanov
    Contributor

    Working on it

  2. added
    3.13only security fixes
    3.14bugs and security fixes
    3.15bugs and security fixes
    on Nov 14, 2025
  3. added a commit that references this issue on Nov 14, 2025
  4. added a commit that references this issue on Nov 14, 2025
  5. added a commit that references this issue on Nov 14, 2025
  6. added a commit that references this issue on Nov 15, 2025
  7. serhiy-storchaka commented on Nov 15, 2025

    @serhiy-storchaka
    Member

    Thank you for your report @YuanchengJiang and your PR @sergey-miryanov.

  8. efimov-mikhail commented on Nov 15, 2025

    @efimov-mikhail
    Member

    @serhiy-storchaka I should notice that 3.14 backport was not merged.

  9. added a commit that references this issue on Nov 15, 2025
  10. added a commit that references this issue on Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

3.13only security fixes3.14bugs and security fixes3.15bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions