Type slots are not thread-safe in free-threaded builds #127266
Labels
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
topic-free-threading
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
Modification of type slots is protected by the global type lock, however, type slots are read non-atomically without holding the type lock. For example, in
PyObject_SetItem
:cpython/Objects/abstract.c
Lines 231 to 235 in 5bb059f
It's not clear how we want to address this. From @colesbury in #127169 (comment):
CPython versions tested on:
3.13, 3.14, CPython main branch
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: