Author nascheme
Recipients Mark.Shannon, benjamin.peterson, christian.heimes, inada.naoki, jdemeyer, larry, lukasz.langa, miss-islington, nascheme, ned.deily, pablogsal, petr.viktorin, pitrou, tim.peters, vstinner
Date 2019-10-01.20:55:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569963323.42.0.838084079366.issue38006@roundup.psfhosted.org>
In-reply-to
Content
Łukasz, is there some reason you removed old versions (2.7, 3.6, etc)?  The bug is present on those versions of Python and it should be trivial to backport the fix.  If those branches are maintained, I think we should fix it.

Attached is a small test program (gc_weakref_bug_demo2.py) that causes the same crash as in this bug report (SEGV inside _PyFunction_Vectorcall).  Setting things up is quite tricky and it depends on the order that things are cleared in delete_garbage().  Maybe still worth making a unit test for it?

Instead of using the 'dummy' function, you can also use types.SimpleNamespace().  Calling repr() on it after tp_clear will result in a crash or an assert failure.  Those two crashes are not needed to confirm the bug.  Just the fact that 'callback' runs is proof enough.  So, in a unit test, the callback to just set a global to indicate failure.
History
Date User Action Args
2019-10-01 20:55:23naschemesetrecipients: + nascheme, tim.peters, pitrou, vstinner, larry, christian.heimes, benjamin.peterson, ned.deily, petr.viktorin, inada.naoki, lukasz.langa, Mark.Shannon, jdemeyer, pablogsal, miss-islington
2019-10-01 20:55:23naschemesetmessageid: <1569963323.42.0.838084079366.issue38006@roundup.psfhosted.org>
2019-10-01 20:55:23naschemelinkissue38006 messages
2019-10-01 20:55:23naschemecreate