Closed
Description
Bug report
The MemoryError
freelist isn't thread-safe if the GIL is disabled:
Lines 3850 to 3860 in 285c1c4
Most of the freelists were made thread-safe by making them per-thread in the free threaded build (using pycore_freelist.h
), but we don't want to do that for MemoryError
because its freelist serves a different purpose (it's not really for performance). I think we should just use a lock for MemoryError
's freelist.