GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Extensions that raise exceptions in their `PyInit*` cause a crash in subinterpreters · Issue #144601 · python/cpython Closed Closed Copy link Labels 3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs 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 DescriptionCrash reportWhat happened?I found this while investigating #138045. If a diff --git a/Modules/xxsubtype.c b/Modules/xxsubtype.c index a8a1417f40e..57a5ef75eb7 100644 --- a/Modules/xxsubtype.c +++ b/Modules/xxsubtype.c @@ -324,5 +324,6 @@ static struct PyModuleDef xxsubtypemodule = { PyMODINIT_FUNC PyInit_xxsubtype(void) { - return PyModuleDef_Init(&xxsubtypemodule); + PyErr_SetString(PyExc_TypeError, "whatever"); + return NULL; } from concurrent import interpreters interp = interpreters.create() interp.exec("import xxsubtype") # Crash! This isn't usually a problem for multi-phase extensions, because I believe the problem lies here: Lines 2178 to 2196 in d736349
The exception object raised by the 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
Activity
MetadataMetadataAssigneesLabels3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs 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
MilestoneRelationshipsDevelopmentIssue actions | ||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |