]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109894: Fix initialization of static `MemoryError` in subinterpreter (gh-110911)
authorRadislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
Mon, 23 Oct 2023 23:06:59 +0000 (02:06 +0300)
committerGitHub <noreply@github.com>
Mon, 23 Oct 2023 23:06:59 +0000 (17:06 -0600)
commit47d3e2ed930a9f3d228aed4f62133737dae74cf7
tree3d2097e5361f2185add54f89d9a96ab14978861b
parent96cbd1e1db3447a33e5cc5cc2886ce79b61cc6eb
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>
Include/internal/pycore_runtime_init.h
Lib/test/test_exceptions.py
Misc/NEWS.d/next/Core and Builtins/2023-10-15-22-18-45.gh-issue-109894.UAmo06.rst [new file with mode: 0644]
Objects/exceptions.c