gh-109894: Fix initialization of static MemoryError in subinterpreter (gh-110911)
Fixes #109894 * set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call * allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
96cbd1e1db
commit
47d3e2ed93
@@ -3700,10 +3700,6 @@ _PyExc_FiniTypes(PyInterpreterState *interp)
|
||||
PyStatus
|
||||
_PyExc_InitGlobalObjects(PyInterpreterState *interp)
|
||||
{
|
||||
if (!_Py_IsMainInterpreter(interp)) {
|
||||
return _PyStatus_OK();
|
||||
}
|
||||
|
||||
if (preallocate_memerrors() < 0) {
|
||||
return _PyStatus_NO_MEMORY();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user