]> granicus.if.org Git - python/commit
Clear weakrefs in garbage found by the GC (GH-16495) (#16499)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 30 Sep 2019 17:27:46 +0000 (10:27 -0700)
committerŁukasz Langa <lukasz@langa.pl>
Mon, 30 Sep 2019 17:27:46 +0000 (19:27 +0200)
commit92ca515ee1efbdc51678e12d105ad642c9b9cc13
treef4488b73b4fe285dfcbdcdb01b48418ced310940
parent18c4ba9f33868761e374a725d497902863d59ea9
Clear weakrefs in garbage found by the GC (GH-16495) (#16499)

Fix a bug due to the interaction of weakrefs and the cyclic garbage
collector. We must clear any weakrefs in garbage in order to prevent
their callbacks from executing and causing a crash.
(cherry picked from commit bcda460baf25062ab68622b3f043f52b9db4d21d)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Misc/NEWS.d/next/Core and Builtins/2019-09-30-09-33-21.bpo-38006.UYlJum.rst [new file with mode: 0644]
Modules/gcmodule.c