Skip to content

Commit 34379d0

Browse files
authored
gh-117657: Fix data race in dict_dict_merge (gh-129755)
Found while running `test_load_attr_module` from `test_opcache` under TSan.
1 parent 1758447 commit 34379d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/dictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3793,7 +3793,7 @@ dict_dict_merge(PyInterpreterState *interp, PyDictObject *mp, PyDictObject *othe
37933793

37943794
ensure_shared_on_resize(mp);
37953795
dictkeys_decref(interp, mp->ma_keys, IS_DICT_SHARED(mp));
3796-
mp->ma_keys = keys;
3796+
set_keys(mp, keys);
37973797
STORE_USED(mp, other->ma_used);
37983798
ASSERT_CONSISTENT(mp);
37993799

0 commit comments

Comments
 (0)