]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117657: Fix QSBR race condition (#118843)
authorAlex Turner <alexturner@meta.com>
Fri, 10 May 2024 14:26:35 +0000 (15:26 +0100)
committerGitHub <noreply@github.com>
Fri, 10 May 2024 14:26:35 +0000 (10:26 -0400)
commit33d20199af65c741bdc908a968edd8dc179b6974
treed9172e4a7410ea8d80f87ca939683cb83e9d00f9
parent22d5185308f85efa22ec1e8251c409fe1cbd9e6b
gh-117657: Fix QSBR race condition (#118843)

`_Py_qsbr_unregister` is called when the PyThreadState is already
detached, so the access to `tstate->qsbr` isn't safe without locking the
shared mutex. Grab the `struct _qsbr_shared` from the interpreter
instead.
Include/internal/pycore_qsbr.h
Python/pystate.c
Python/qsbr.c
Tools/tsan/suppressions_free_threading.txt