]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-148393: Use atomic ops on _ma_watcher_tag in free threading build (gh-14839...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 12 Apr 2026 15:05:34 +0000 (17:05 +0200)
committerGitHub <noreply@github.com>
Sun, 12 Apr 2026 15:05:34 +0000 (15:05 +0000)
commita89b2419e063b19c6d59428c40cd1ab58606e0b2
tree14903b2f14d1ddaf9b11678e75f42bf95055363d
parenta9d122fb0547ee0f97cd3034fbd8bb5ca1e5800b
[3.14] gh-148393: Use atomic ops on _ma_watcher_tag in free threading build (gh-148397) (#148451)

Fixes data races between dict mutation and watch/unwatch on the same dict.
(cherry picked from commit 3ab94d684286b49144bf2e43cc1041f3e4c0cda8)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Include/internal/pycore_dict.h
Include/internal/pycore_pyatomic_ft_wrappers.h
Lib/test/test_free_threading/test_dict.py
Misc/NEWS.d/next/Core_and_Builtins/2026-04-11-17-28-52.gh-issue-148393.lX6gwN.rst [new file with mode: 0644]
Objects/dictobject.c
Python/optimizer_analysis.c