]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117657: Fix TSAN race involving import lock (#118523)
authorSam Gross <colesbury@gmail.com>
Thu, 6 Jun 2024 17:40:58 +0000 (13:40 -0400)
committerGitHub <noreply@github.com>
Thu, 6 Jun 2024 17:40:58 +0000 (13:40 -0400)
commite21057b99967eb5323320e6d1121955e0cd2985e
tree10bff96fbf34c833c65258d6565ed47cbbd2c62c
parent417bec733c11e63df559ecf898802dbef590142e
gh-117657: Fix TSAN race involving import lock (#118523)

This adds a `_PyRecursiveMutex` type based on `PyMutex` and uses that
for the import lock. This fixes some data races in the free-threaded
build and generally simplifies the import lock code.
Include/internal/pycore_import.h
Include/internal/pycore_lock.h
Modules/_testinternalcapi/test_lock.c
Modules/posixmodule.c
Python/import.c
Python/lock.c
Tools/tsan/suppressions_free_threading.txt