We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a85eeb9 commit 0b46f65Copy full SHA for 0b46f65
Objects/dictobject.c
@@ -3254,7 +3254,8 @@ dict_dealloc(PyObject *self)
3254
Py_TRASHCAN_BEGIN(mp, dict_dealloc)
3255
if (values != NULL) {
3256
if (values->embedded == 0) {
3257
- for (i = 0, n = mp->ma_keys->dk_nentries; i < n; i++) {
+ n = FT_ATOMIC_LOAD_SSIZE_RELAXED(mp->ma_keys->dk_nentries);
3258
+ for (i = 0; i < n; i++) {
3259
Py_XDECREF(values->values[i]);
3260
}
3261
free_values(values, false);
0 commit comments