Author collinwinter
Recipients
Date 2006-07-04.16:39:01
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The attached patch fixes the bug pointed out in
crashers/gc_inspection.py, namely that
gc.get_referrers() can be used to see objects (in this
case tuples) before their built, leading to segfaults.

The patch works by modifying
Objects/abstract.c:PySequence_AsTuple, wrapping the
call to PyIter_Next() with _PyObject_GC_TRACK/UNTRACK
calls. This has the effect of hiding the being-created
tuple from gc.get_referrers() while fetching the next
item from the iterator.

Also attached is a patch to crashers/gc_inspection.py
itself, which allows the test to actually pass (the
previous version would raise IndexErrors in the event
the test passed).
History
Date User Action Args
2007-08-23 15:53:17adminlinkissue1517042 messages
2007-08-23 15:53:17admincreate