[3.14] gh-140431: Fix GC crash due to partially initialized coroutines (gh-140470) (gh-140504)
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. (cherry picked from commit 574405c19e9b5de0504be46a3925027ded4495ae) Co-authored-by: Sam Gross <colesbury@gmail.com>
M
Miss Islington (bot) committed
3944e9b3b24de994d46eb7f4af6eec49b3324271
Parent: 564bb00
Committed by GitHub <noreply@github.com>
on 10/23/2025, 2:44:21 PM