mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
[3.13] gh-117657: Fix data race in dict_dict_merge
(gh-129755) (gh-129808)
Found while running `test_load_attr_module` from `test_opcache` under TSan.
(cherry picked from commit 34379d0a59
)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
aae0a1f904
commit
8a7146c5eb
1 changed files with 1 additions and 1 deletions
|
@ -3713,7 +3713,7 @@ dict_dict_merge(PyInterpreterState *interp, PyDictObject *mp, PyDictObject *othe
|
|||
|
||||
ensure_shared_on_resize(mp);
|
||||
dictkeys_decref(interp, mp->ma_keys, IS_DICT_SHARED(mp));
|
||||
mp->ma_keys = keys;
|
||||
set_keys(mp, keys);
|
||||
STORE_USED(mp, other->ma_used);
|
||||
mp->ma_version_tag = new_version;
|
||||
ASSERT_CONSISTENT(mp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue