diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-12-12 19:18:27 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-12-12 19:18:27 (GMT) |
commit | 6b7dfc924d094d2cad8d7b88a7b2d787e41f8ed4 (patch) | |
tree | 8bf096cf0cc1c771a79703ac2dbc4825097e141b /Objects/tupleobject.c | |
parent | 05d2e084019d9ec67277df36acf372b81e18365f (diff) | |
download | cpython-6b7dfc924d094d2cad8d7b88a7b2d787e41f8ed4.zip cpython-6b7dfc924d094d2cad8d7b88a7b2d787e41f8ed4.tar.gz cpython-6b7dfc924d094d2cad8d7b88a7b2d787e41f8ed4.tar.bz2 |
Merged revisions 76763 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76763 | antoine.pitrou | 2009-12-12 20:13:08 +0100 (sam., 12 déc. 2009) | 7 lines
Issue #7466: segmentation fault when the garbage collector is called
in the middle of populating a tuple. Patch by Florent Xicluna.
(note: no NEWS entry for trunk since the bug was introduced in 2.7/3.1)
........
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r-- | Objects/tupleobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 290107a..884174d 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -850,7 +850,8 @@ _PyTuple_Resize(PyObject **pv, Py_ssize_t newsize) /* XXX UNREF/NEWREF interface should be more symmetrical */ _Py_DEC_REFTOTAL; - _PyObject_GC_UNTRACK(v); + if (_PyObject_GC_IS_TRACKED(v)) + _PyObject_GC_UNTRACK(v); _Py_ForgetReference((PyObject *) v); /* DECREF items deleted by shrinkage */ for (i = newsize; i < oldsize; i++) { |