Message50600
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). |
|
| Date |
User |
Action |
Args |
| 2007-08-23 15:53:17 | admin | link | issue1517042 messages |
| 2007-08-23 15:53:17 | admin | create | |
|