Skip to content

Commit

Permalink
pythongh-128100: Use atomic dictionary load in `_PyObject_GenericGetA…
Browse files Browse the repository at this point in the history
…ttrWithDict` (pythonGH-128297)
  • Loading branch information
wrongnull authored and srinivasreddy committed Jan 8, 2025
1 parent 378d062 commit b5cc4cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit b5cc4cf

Please sign in to comment.