cpython/Objects
Tim Peters add09b4149 SF bug 840829: weakref callbacks and gc corrupt memory.
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.
2003-11-12 20:43:28 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
abstract.c Fix Greg Ward's error message nit: PyObject_SetItem and PySequenceSetItem 2003-10-27 09:22:16 +00:00
boolobject.c - bool() called without arguments now returns False rather than 2003-04-19 18:15:10 +00:00
bufferobject.c Call me anal, but there was a particular phrase that was speading to 2002-08-19 19:26:42 +00:00
cellobject.c Use new GC API. 2001-08-29 23:54:21 +00:00
classobject.c Deleting cyclic object comparison. 2003-10-28 12:05:48 +00:00
cobject.c Make CObjects mutable. Fixes #477441. 2003-10-19 18:30:01 +00:00
complexobject.c Simplify and speedup uses of Py_BuildValue(): 2003-10-12 19:09:37 +00:00
descrobject.c Return a bool rather than an int from proxy_has_key(). 2003-10-09 03:47:08 +00:00
dictnotes.txt Add notes on use cases with paired accesses to the same key. 2003-05-28 14:10:46 +00:00
dictobject.c SF patch #798467: Update docstring of has_key for bool changes 2003-09-01 22:12:08 +00:00
enumobject.c Optimize reversed(list) using a custom iterator. 2003-11-07 15:38:09 +00:00
fileobject.c Patch #809535: Mention behaviour of seek on text files. Backported to 2.3. 2003-10-18 09:38:01 +00:00
floatobject.c SF patch 703666: Several objects don't decref tmp on failure in subtype_new 2003-06-28 20:04:25 +00:00
frameobject.c Removing bogus Py_DECREF() reported by Armin Rigo (SF bug 812353). 2003-10-21 18:14:20 +00:00
funcobject.c SF bug #753451: classmethod abuse --> SystemError 2003-06-18 01:13:41 +00:00
intobject.c Add a couple of decrefs to error paths. 2003-08-11 17:32:02 +00:00
iterobject.c Whitespace normalization. 2003-06-25 13:12:18 +00:00
listobject.c Improve the reverse list iterator to free memory as soon as the iterator 2003-11-08 11:58:44 +00:00
listsort.txt Fixed new typos, added a little info about ~sort versus "hint"s. 2002-08-10 07:04:01 +00:00
longobject.c SF patch 703666: Several objects don't decref tmp on failure in subtype_new 2003-06-28 20:04:25 +00:00
methodobject.c Make __module__ writable except in restricted mode (like for classic classes). 2003-02-18 17:18:35 +00:00
moduleobject.c Remove code that tried to warn about shadowing builtin names after a 2003-07-16 22:04:11 +00:00
object.c Deleting cyclic object comparison. 2003-10-28 12:05:48 +00:00
obmalloc.c Whitespace normalization. 2003-06-17 15:48:11 +00:00
rangeobject.c Implement and apply PEP 322, reverse iteration 2003-11-06 14:06:48 +00:00
sliceobject.c SF bug #800796: Difference between hash() and __hash__() 2003-09-05 14:27:30 +00:00
stringobject.c Avoid confusing name for the 3rd argument to str.replace(). 2003-10-22 02:56:40 +00:00
structseq.c Removed all uses of the out-of-favor __safe_for_unpickling__ magic 2003-02-01 02:16:37 +00:00
tupleobject.c Extended tuple's C API to include a new function, PyTuple_Pack() that is 2003-10-12 18:24:34 +00:00
typeobject.c SF bug 840829: weakref callbacks and gc corrupt memory. 2003-11-12 20:43:28 +00:00
unicodectype.c Make lower/upper/title work for non-BMP characters. 2002-10-18 16:40:36 +00:00
unicodeobject.c Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap(). 2003-10-24 14:25:28 +00:00
unicodetype_db.h Add unidata_version. Bump generator version number. 2002-11-25 09:13:37 +00:00
weakrefobject.c Remove proxy_print(), since that caused an inconsistency between 2003-07-14 21:46:23 +00:00