cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-135909: Assert incoming refcnt != 0 for the free threaded GC.

Open andrewreds opened this issue 5 months ago • 2 comments

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

andrewreds avatar Jun 27 '25 03:06 andrewreds

All commit authors signed the Contributor License Agreement.

CLA signed

python-cla-bot[bot] avatar Jun 27 '25 03:06 python-cla-bot[bot]

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.

bedevere-app[bot] avatar Jun 27 '25 03:06 bedevere-app[bot]

: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.

bedevere-bot avatar Jul 03 '25 13:07 bedevere-bot