summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
authorRadislav Chugunov <52372310+chgnrdv@users.noreply.github.com>2023-10-23 23:06:59 (GMT)
committerGitHub <noreply@github.com>2023-10-23 23:06:59 (GMT)
commit47d3e2ed930a9f3d228aed4f62133737dae74cf7 (patch)
tree3d2097e5361f2185add54f89d9a96ab14978861b /Objects/exceptions.c
parent96cbd1e1db3447a33e5cc5cc2886ce79b61cc6eb (diff)
downloadcpython-47d3e2ed930a9f3d228aed4f62133737dae74cf7.zip
cpython-47d3e2ed930a9f3d228aed4f62133737dae74cf7.tar.gz
cpython-47d3e2ed930a9f3d228aed4f62133737dae74cf7.tar.bz2
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>
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 4862345..e3e8e02 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -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();
}