]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117657: Fix race involving immortalizing objects (#119927)
authorSam Gross <colesbury@gmail.com>
Mon, 3 Jun 2024 20:58:41 +0000 (16:58 -0400)
committerGitHub <noreply@github.com>
Mon, 3 Jun 2024 20:58:41 +0000 (20:58 +0000)
commit47fb4327b5c405da6df066dcaa01b7c1aefab313
tree8b5e04508b3cdced61e56eb200c4fc46a50ed11d
parentb8fde5db86334690da23343f5f4326adcd8160fb
gh-117657: Fix race involving immortalizing objects (#119927)

The free-threaded build currently immortalizes objects that use deferred
reference counting (see gh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the
behavior is suppressed.
Include/internal/pycore_gc.h
Lib/test/support/__init__.py
Modules/_testinternalcapi.c
Objects/codeobject.c
Objects/object.c
Python/bltinmodule.c
Python/gc_free_threading.c
Python/pystate.c
Tools/tsan/suppressions_free_threading.txt