Skip to content

Assertion crash in code_returns_only_none #139778

Open

Description

@efimov-mikhail

Crash report

What happened?

There is incorrect assertion in code_returns_only_none function from Objects/codeobject.c:

-> % cat subinterpreteres_assert.py     
from concurrent import interpreters

interp = interpreters.create()
interp.exec("""while True: pass""")

-> % ./python subinterpreteres_assert.py
python: Objects/codeobject.c:2132: code_returns_only_none: Assertion `IS_RAISE_OPCODE(final.op.code)' failed.
[1]    1341262 IOT instruction  ./python subinterpreteres_assert.py

I've already have a PR which fixes it.

CPython versions tested on:

CPython main branch, 3.14

Operating systems tested on:

No response

Output from running 'python -VV' on the command line:

No response

Linked PRs

Activity

  1. added
    type-crash
    on Oct 8, 2025
  2. assigned and unassigned on Oct 8, 2025
  3. added
    extension-modules
    3.14
    3.15
    on Oct 8, 2025
  4. picnixz commented on Oct 8, 2025

    @picnixz
    Member

    Does it also occur on 3.13 if we dabble with some private modules?

  5. efimov-mikhail commented on Oct 8, 2025

    @efimov-mikhail
    MemberAuthor

    Does it also occur on 3.13 if we dabble with some private modules?

    I don't think so.
    This function entirely was added recently: #132981

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

3.143.15extension-modulestopic-subinterpreterstype-crash

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions