-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
List comprehensions cause subinterpreter crashes #135450
Copy link
Copy link
Closed
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Projects
Status
Done
Crash report
What happened?
If you use any list comprehension inside a subinterpreter (either through
_interpretersor throughinterpreters), an assertion fails in_PyCode_CheckNoExternalState:This was originally causing failures in #134606. I think that assertion can be removed, because
_PyCode_CheckNoExternalStateseems to have no need for the number of hidden locals being zero.cc @ericsnowcurrently
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
No response
Linked PRs
_PyCode_CheckNoExternalState#135466_PyCode_CheckNoExternalState(gh-135466) #135694