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
{{ message }}
Repository navigation
Crash because of ownership assert in PyObject_ClearManagedDict on Free Threading #152254
fromunittest.mockimportMagicMockfrom_testcapiimportset_nomemoryset_nomemory(200) # fail allocations from the 200th onward (lands in shutdown GC)
(MagicMock(), undefined_name) # build a MagicMock (managed __dict__), then NameError abandons# it into a traceback cycle -> survives to shutdown GC
changed the title [-]Crash because of ownership assert in `PyObject_ClearManagedDict`[/-][+]Crash because of ownership assert in `PyObject_ClearManagedDict` on Free Threading[/+]on Nov 14, 2026
Activity
[-]Crash because of ownership assert in `PyObject_ClearManagedDict`[/-][+]Crash because of ownership assert in `PyObject_ClearManagedDict` on Free Threading[/+]vstinner commentedon Nov 14, 2026
Ah, the reproducer requires Free Threading. Using Free Threading, I get: