Author nascheme
Recipients Mark.Shannon, christian.heimes, inada.naoki, jdemeyer, lukasz.langa, miss-islington, nascheme, pablogsal, petr.viktorin, pitrou, tim.peters, vstinner
Date 2019-09-30.01:06:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569805591.48.0.0147991400448.issue38006@roundup.psfhosted.org>
In-reply-to
Content
Since W is in the unreachable set, we should not be executing its callback.  Would the attached rough patch (gc_disable_wr_callback.txt) be a possible fix?  When we find W inside handle_weakrefs(), we mark it as trash and will not execute the callback.

This is similar to Pablo's bpo-38009 but I think attacks the problem in a better way.  Having func_clear() being run is only one possible bad outcome of executing the callback.  We want to avoid executing *any* user level Python code if the weakref has access to objects found by the GC and which have tp_clear called on them.
History
Date User Action Args
2019-09-30 01:06:31naschemesetrecipients: + nascheme, tim.peters, pitrou, vstinner, christian.heimes, petr.viktorin, inada.naoki, lukasz.langa, Mark.Shannon, jdemeyer, pablogsal, miss-islington
2019-09-30 01:06:31naschemesetmessageid: <1569805591.48.0.0147991400448.issue38006@roundup.psfhosted.org>
2019-09-30 01:06:31naschemelinkissue38006 messages
2019-09-30 01:06:31naschemecreate