mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
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:
parent
96cbd1e1db
commit
47d3e2ed93
4 changed files with 16 additions and 4 deletions
|
@ -177,6 +177,7 @@ extern PyTypeObject _PyExc_MemoryError;
|
|||
}, \
|
||||
.last_resort_memory_error = { \
|
||||
_PyObject_HEAD_INIT(&_PyExc_MemoryError) \
|
||||
.args = (PyObject*)&_Py_SINGLETON(tuple_empty) \
|
||||
}, \
|
||||
}, \
|
||||
}, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue