• Tim Peters's avatar
    SF bug 840829: weakref callbacks and gc corrupt memory. · add09b41
    Tim Peters yazdı
    subtype_dealloc():  This left the dying object exposed to gc, so that
    if cyclic gc triggered during the weakref callback, gc tried to delete
    the dying object a second time.  That's a disaster.  subtype_dealloc()
    had a (I hope!) unique problem here, as every normal dealloc routine
    untracks the object (from gc) before fiddling with weakrefs etc.  But
    subtype_dealloc has obscure technical reasons for re-registering the
    dying object with gc (already explained in a large comment block at
    the bottom of the function).
    
    The fix amounts to simply refraining from reregistering the dying object
    with gc until after the weakref callback (if any) has been called.
    
    This is a critical bug (hard to predict, and causes seemingly random
    memory corruption when it occurs).  I'll backport it to 2.3 later.
    add09b41
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...