[3.13] gh-128100: Use atomic dictionary load in _PyObject_GenericGetAttrWithDict (GH-128297) (GH-129979)

(cherry picked from commit 47d2cb8eb7)

Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-02-10 21:48:24 +01:00 committed by GitHub
parent a38bacd41f
commit 052632279d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1692,7 +1692,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
}
}
}