]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-109894: Fix initialization of static `MemoryError` in subinterpreter (gh...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 28 Nov 2023 02:41:53 +0000 (03:41 +0100)
committerGitHub <noreply@github.com>
Tue, 28 Nov 2023 02:41:53 +0000 (19:41 -0700)
commit0aceac557d78a4e284e72481fcb3a3ec45ecedba
tree77a924b3bbcf55107188f3f0b57ba7ac6c6b7602
parent1e1a30f9f49ed5104a4be194d094b13703bcc0de
[3.12] gh-109894: Fix initialization of static `MemoryError` in subinterpreter (gh-110911) (gh-111238)

Fixes GH-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

---------

(cherry picked from commit 47d3e2ed930a9f3d228aed4f62133737dae74cf7)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
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