]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-135909: Assert incoming `refcnt != 0` for the free threaded GC (GH-136009)
authorandrewreds <andrewreds@gmail.com>
Tue, 15 Jul 2025 15:26:16 +0000 (01:26 +1000)
committerGitHub <noreply@github.com>
Tue, 15 Jul 2025 15:26:16 +0000 (11:26 -0400)
commit2500eb96b260b05387d4ab1063fcfafebf37f1a4
treeaad84153e3b70f34b990adc5d43c2cf3e6a20086
parentbe02e68158aee4d70f15baa1d8329df2c35a57f2
gh-135909: Assert incoming `refcnt != 0` for the free threaded GC (GH-136009)

This helps catch double deallocation bugs and is similar to the
assertion in the GIL-enabled build.  The call to `validate_refcounts`
is moved up to start of the GC because `queue_untracked_obj_decref()`
creates it own zero reference count garbage.
Python/gc_free_threading.c