Skip to content

gh-159136: Keep eval-frame recorded function names alive - #160836

Merged
nascheme merged 1 commit into
python:mainfrom
nascheme:gh-159136-eval-frame-name-lifetime
Oct 29, 2026
Merged

nascheme merged 1 commit into
python:mainfrom
nascheme:gh-159136-eval-frame-name-lifetime

Conversation

@nascheme

@nascheme nascheme commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Hold a strong reference to func_name in both recording hooks before PyList_Append can detach while acquiring the recording list lock.

Note, this should not need to be backported, it's included in backported PRs for the gh-159136 issue.

Hold a strong reference to func_name in both recording hooks before
PyList_Append can detach while acquiring the recording list lock.
@nascheme
nascheme marked this pull request as ready for review October 29, 2026 17:16
@nascheme
nascheme merged commit 0387541 into python:main Oct 29, 2026
84 checks passed
@nascheme
nascheme deleted the gh-159136-eval-frame-name-lifetime branch October 29, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir topic-free-threading type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants