cpython
cpython copied to clipboard
gh-135909: Assert incoming refcnt != 0 for the free threaded GC.
This is to catch out double deallocation bugs. Likely from a faulty .tp_dealloc allowing the GC to run before the object is untracked.
This assert matches the one added to the GIL build, in 780c497972f367df86cf0f6f3b7c2aecf1e078d6. The call to validate_refcounts was moved up to start of the GC because queue_untracked_obj_decref() creates it own zero reference count garbage.
- Issue: gh-135909
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.
If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.
:robot: New build scheduled with the buildbot fleet by @colesbury for commit 08820168a4255aa941a71ab0c916e13e603e2976 :robot:
Results will be shown at:
https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136009%2Fmerge
If you want to schedule another build, you need to add the :hammer: test-with-buildbots label again.