]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 12 Nov 2024 12:45:12 +0000 (13:45 +0100)
committerGitHub <noreply@github.com>
Tue, 12 Nov 2024 12:45:12 +0000 (13:45 +0100)
commit02cd3ce0f201df98939c65bcba8445bb0b70717b
treeb9c41e26f84bc71aa464253d010ebdfaf27ac87a
parent4f1440fd89c58c46094422423972496b5d870316
[3.13] gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865) (gh-125709) (GH-125204)

* gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865)

Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.

This is an un-revert of gh-124646 that then addresses the Py_TRACE_REFS
failures identified by gh-124785.
(cherry picked from commit f2cb39947093feda3ff85b8dc820922cc5e5f954)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-125286: Share the Main Refchain With Legacy Interpreters (gh-125709)

They used to be shared, before 3.12.  Returning to sharing them resolves a failure on Py_TRACE_REFS builds.

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Doc/library/sys.rst
Doc/using/configure.rst
Doc/whatsnew/3.13.rst
Misc/NEWS.d/next/Core_and_Builtins/2024-09-26-18-21-06.gh-issue-116510.FacUWO.rst [new file with mode: 0644]
Objects/object.c
Objects/unicodeobject.c
Python/pylifecycle.c
Python/pystate.c