gh-128100: Use atomic dictionary load in _PyObject_GenericGetAttrWithDict (GH-128297)

This commit is contained in:
Bogdan Romanyuk 2024-12-30 23:38:49 +03:00 committed by GitHub
parent fe4dd07a84
commit 47d2cb8eb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1717,7 +1717,11 @@ _PyObject_GenericGetAttrWithDict(PyObject *obj, PyObject *name,
else {
PyObject **dictptr = _PyObject_ComputedDictPointer(obj);
if (dictptr) {
#ifdef Py_GIL_DISABLED
dict = _Py_atomic_load_ptr_acquire(dictptr);
#else
dict = *dictptr;
#endif
}
}
}