• Amaury Forgeot d'Arc's avatar
    Crashers of the day: Py_CLEAR must be used when there is a chance that the · 588ff93f
    Amaury Forgeot d'Arc yazdı
    function can be called recursively.
    This was discussed in issue1020188.
    
    In python codebase, all occurrences of Py_[X]DECREF(xxx->yyy) are suspect,
    except when they appear in tp_new or tp_dealloc functions, or when
    the member cannot be of a user-defined class.
    Note that tp_init is not safe.
    
    I do have a (crashing) example for every changed line.
    Is it worth adding them to the test suite?
    
    Example:
    
    class SpecialStr(str):
        def __del__(self):
            s.close()
    
    import cStringIO
    s = cStringIO.StringIO(SpecialStr("text"))
    s.close() # Segfault
    588ff93f
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...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README 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...