aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-03-29 14:47:18 +0000
committerGuido van Rossum <guido@python.org>2002-03-29 14:47:18 +0000
commit919c066be2f81fe81a207ec6f1367fd309ca6183 (patch)
tree713edbcf629442641d19c9cd658dcefca7fe9477
parentNews for SF #535905. (diff)
downloadcpython-919c066be2f81fe81a207ec6f1367fd309ca6183.tar.gz
cpython-919c066be2f81fe81a207ec6f1367fd309ca6183.tar.bz2
cpython-919c066be2f81fe81a207ec6f1367fd309ca6183.zip
Backport to 2.2.1:
This is Neil's fix for SF bug 535905 (Evil Trashcan and GC interaction). The fix makes it possible to call PyObject_GC_UnTrack() more than once on the same object, and then move the PyObject_GC_UnTrack() call to *before* the trashcan code is invoked. BUGFIX CANDIDATE!
-rw-r--r--Python/traceback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index fee9d12a00e..c1c2c16ac13 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -35,8 +35,8 @@ tb_getattr(tracebackobject *tb, char *name)
static void
tb_dealloc(tracebackobject *tb)
{
+ PyObject_GC_UnTrack(tb);
Py_TRASHCAN_SAFE_BEGIN(tb)
- _PyObject_GC_UNTRACK(tb);
Py_XDECREF(tb->tb_next);
Py_XDECREF(tb->tb_frame);
PyObject_GC_Del(tb);