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. added
    type-bug
    on Nov 9, 2025
  2. added
    interpreter-core
    on Nov 9, 2025
  3. sergey-miryanov commented on Nov 9, 2025

    @sergey-miryanov
    Contributor

    Working on it

  4. added
    3.13
    3.14
    3.15
    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 14, 2025
  7. added a commit that references this issue on Nov 14, 2025
  8. added a commit that references this issue on Nov 15, 2025
  9. serhiy-storchaka commented on Nov 15, 2025

    @serhiy-storchaka
    Member

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

  10. efimov-mikhail commented on Nov 15, 2025

    @efimov-mikhail
    Member

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

  11. added a commit that references this issue on Nov 15, 2025
  12. 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.133.143.15interpreter-coretype-bug

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions