]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-140431: Fix GC crash due to partially initialized coroutines (gh-140470)
authorSam Gross <colesbury@gmail.com>
Thu, 23 Oct 2025 14:18:13 +0000 (10:18 -0400)
committerGitHub <noreply@github.com>
Thu, 23 Oct 2025 14:18:13 +0000 (10:18 -0400)
commit574405c19e9b5de0504be46a3925027ded4495ae
tree3b80d2f02276eb677f85843b1b4f986ac1be572d
parent4d0849426f4c6862e50658c4e35341ffb5ab288b
gh-140431: Fix GC crash due to partially initialized coroutines (gh-140470)

The `make_gen()` function creates and tracks generator/coro objects, but
doesn't fully initialize all the fields. At a minimum, we need to
initialize all the fields that may be accessed by gen_traverse because
the call to `compute_cr_origin()` can trigger a GC.
Misc/NEWS.d/next/Core_and_Builtins/2025-10-22-17-22-22.gh-issue-140431.m8D_A-.rst [new file with mode: 0644]
Objects/genobject.c