mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-117657: Enable test_opcache under TSAN (GH-129831)
Fix a few thread-safety bugs to enable test_opcache when run with TSAN: * Use relaxed atomics when clearing `ht->_spec_cache.getitem` (gh-115999) * Add temporary suppression for type slot modifications (gh-127266) * Use atomic load when reading `*dictptr`
This commit is contained in:
parent
ed816f1a70
commit
f151d27159
4 changed files with 9 additions and 3 deletions
|
@ -1612,7 +1612,7 @@ _PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method)
|
|||
else {
|
||||
PyObject **dictptr = _PyObject_ComputedDictPointer(obj);
|
||||
if (dictptr != NULL) {
|
||||
dict = *dictptr;
|
||||
dict = FT_ATOMIC_LOAD_PTR_ACQUIRE(*dictptr);
|
||||
}
|
||||
else {
|
||||
dict = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue