← 输入框|github.com|刷新
Skip to content

[3.14] gh-140431: Fix GC crash due to partially initialized coroutines (gh-140470) - #140504

Merged
colesbury merged 1 commit into
python:3.14from
miss-islington:backport-574405c-3.14
Oct 23, 2025
Merged

colesbury merged 1 commit into
python:3.14from
miss-islington:backport-574405c-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 23, 2025 •

Copy link
Copy Markdown
Contributor

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 574405c)

Co-authored-by: Sam Gross colesbury@gmail.com

…pythongh-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.
(cherry picked from commit 574405c)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants