]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-136870: fix data races in instrumentation of bytecode (#136994)
authorKumar Aditya <kumaraditya@python.org>
Thu, 24 Jul 2025 17:58:46 +0000 (23:28 +0530)
committerGitHub <noreply@github.com>
Thu, 24 Jul 2025 17:58:46 +0000 (17:58 +0000)
commit9a6b60af409d02468b935c569a4f49e88c399c4e
treea9c162f15451d79cdf679d6e2c4c0a45f0a4cadd
parent245671555b7e33112ae1efd0c26071d7a0e27b3a
gh-136870: fix data races in instrumentation of bytecode (#136994)

De-instrumenting code objects modifies the thread local bytecode for all threads as such, holding the critical section on the code object is not sufficient and leads to data races. Now, the de-instrumentation is now performed under a stop the world pause as such no thread races with executing the thread local bytecode while it is being de-instrumented.
Misc/NEWS.d/next/Core_and_Builtins/2025-07-24-17-30-58.gh-issue-136870.ncx82J.rst [new file with mode: 0644]
Python/instrumentation.c