]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-136870: fix data race in `PyThreadState_Clear` on `sys_tracing_threads` (#136951)
authorKumar Aditya <kumaraditya@python.org>
Mon, 21 Jul 2025 20:35:25 +0000 (02:05 +0530)
committerGitHub <noreply@github.com>
Mon, 21 Jul 2025 20:35:25 +0000 (20:35 +0000)
commitf183996eb77fd2d5662c62667298c292c943ebf5
tree19547c325393c1923547fdc7c92ddc89d042dc2d
parent322442945084ea9055f86a17fa5096b11ba5b344
gh-136870: fix data race in `PyThreadState_Clear` on `sys_tracing_threads` (#136951)

In free-threading, multiple threads can be cleared concurrently as such the modifications on `sys_tracing_threads` should be done while holding the profile lock, otherwise it can race with other threads setting up profiling.
Python/pystate.c