Author vstinner
Recipients Mark.Shannon, christian.heimes, jdemeyer, lukasz.langa, pablogsal, petr.viktorin, pitrou, vstinner
Date 2019-09-03.19:22:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1567538540.65.0.539449668045.issue38006@roundup.psfhosted.org>
In-reply-to
Content
gc_crash.py:

* PyObject_GC_UnTrack() + PyObject_GC_Track() is used to order objects in the GC collection 0, the objects which are involved in the reference cycle.

* BadGC2Type type is implemented in C, uses Py_TPFLAGS_HAVE_GC, implements tp_traverse, but it doesn't implement tp_clear.

* IHMO gc_crash.py is only legit code. BadGC2Type implements the GC protocol (except to tp_clear).


I'm not sure that it's the same bug than reproducer.tar.gz which uses a weak reference.

BadGC2Type is used to call a function in tp_dealloc. It should be possible to use a weak reference for that: the weak reference can use a callback. But I failed write a reproducer script using a weak reference.
History
Date User Action Args
2019-09-03 19:22:20vstinnersetrecipients: + vstinner, pitrou, christian.heimes, petr.viktorin, lukasz.langa, Mark.Shannon, jdemeyer, pablogsal
2019-09-03 19:22:20vstinnersetmessageid: <1567538540.65.0.539449668045.issue38006@roundup.psfhosted.org>
2019-09-03 19:22:20vstinnerlinkissue38006 messages
2019-09-03 19:22:20vstinnercreate