• Tim Peters's avatar
    Collector #1208: Infinite loop in cPickleCache. · ab1f767a
    Tim Peters authored
    This fixes it, based on an approach suggested by Toby
    Dickenson.  The triggering condition wasn't entirely
    sane, so was very rare:  a persistent object with a
    __del__ method that referenced an attribute of self.
    
    scan_gc_items():  Look at persistent objects accessed
    while this is running at most once.
    
    New test checkMinimizeTerminates():  This spawns a thread
    that will in fact run forever if you don't recompile
    cPickleCache.c.  The test suite will keep running, but
    checkMinimizeTerminates will fail, and all future calls
    to cacheMinimize() will be effectively ignored (so other
    bad things may happen as a result).
    ab1f767a
cPickleCache.c 31.8 KB