Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.14] gh-136870: fix data races in instrumentation of bytecode (GH-136994)#137082

Merged
hugovk merged 2 commits intopython:3.14python/cpython:3.14from
miss-islington:backport-9a6b60a-3.14miss-islington/cpython:backport-9a6b60a-3.14Copy head branch name to clipboard
Jul 28, 2025
Merged

[3.14] gh-136870: fix data races in instrumentation of bytecode (GH-136994)#137082
hugovk merged 2 commits intopython:3.14python/cpython:3.14from
miss-islington:backport-9a6b60a-3.14miss-islington/cpython:backport-9a6b60a-3.14Copy head branch name to clipboard

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jul 24, 2025

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.
(cherry picked from commit 9a6b60a)

Co-authored-by: Kumar Aditya kumaraditya@python.org

…nGH-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.
(cherry picked from commit 9a6b60a)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
@kumaraditya303 kumaraditya303 requested a review from colesbury July 28, 2025 11:27
@hugovk hugovk merged commit 909a534 into python:3.14 Jul 28, 2025
42 checks passed
kumaraditya303 added a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
…pythonGH-136994) (python#137082)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Zachary Ware <zach@python.org>
@miss-islington miss-islington deleted the backport-9a6b60a-3.14 branch January 2, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.