bpo-38006: Clear weakrefs in garbage found by the GC by nascheme · Pull Request #16495 · python/cpython

@nascheme

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.

ambv pushed a commit that referenced this pull request

Sep 30, 2019
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 bcda460)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>

pitrou

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request

Dec 5, 2019
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.