From: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com> Date: Mon, 30 Dec 2024 20:38:49 +0000 (+0300) Subject: gh-128100: Use atomic dictionary load in `_PyObject_GenericGetAttrWithDict` (GH-128297) X-Git-Tag: v3.14.0a4~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47d2cb8eb7595df5940225867dbb66b6dd59413a;p=thirdparty%2FPython%2Fcpython.git gh-128100: Use atomic dictionary load in `_PyObject_GenericGetAttrWithDict` (GH-128297) --- diff --git a/Objects/object.c b/Objects/object.c index d584414c559b..4c30257ca269 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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 } } }