Assertion crash in `code_returns_only_none`
Open
@efimov-mikhail is already working on this.
Since Oct 16, 2025.
3.14
3.15
extension-modules
topic-subinterpreters
type-crash
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
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
- gh-139779
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.