data race in PyMember_GetOne with _Py_T_OBJECT #132685
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-free-threading
type-bug
An unexpected behavior, bug, or error
Uh oh!
There was an error while loading. Please reload this page.
When running ctypes tests using parallel threads the following data race is reported:
The data race is because when
_Py_T_OBJECT
is used, it currently reads the field non atomically without critical section. It needs to load it using atomics likePy_T_OBJECT_EX
.Linked PRs
_Py_T_OBJECT
#132690The text was updated successfully, but these errors were encountered: