You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the free-threaded GC, we currently call _PyGC_ClearAllFreeLists() after other threads are resumed. That's not safe because the other threads may be using their own freelists at that point.
(Alternatively, we could make each thread responsible for clearing it's own freelist, but that seems more complicated given the current implementation)
Bug report
In the free-threaded GC, we currently call
_PyGC_ClearAllFreeLists()
after other threads are resumed. That's not safe because the other threads may be using their own freelists at that point.cpython/Python/gc_free_threading.c
Lines 1163 to 1164 in d2f1b0e
We should probably move the call earlier, such as immediately after
handle_resurrected_objects
cpython/Python/gc_free_threading.c
Lines 1060 to 1061 in d2f1b0e
(Alternatively, we could make each thread responsible for clearing it's own freelist, but that seems more complicated given the current implementation)
cc @corona10
Linked PRs
The text was updated successfully, but these errors were encountered: