gh-125859: Fix crash when gc.get_objects
is called during GC
#125792
Loading
gc.get_objects
is called during GC
#125792