Skip to content

Assertion crash in code_returns_only_none #139778

@efimov-mikhail

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

Metadata

Metadata

Labels

3.14bugs and security fixes3.15new features, bugs and security fixesextension-modulesC modules in the Modules dirtopic-subinterpreterstype-crashA hard crash of the interpreter, possibly with a core dump

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions