◐ Shell
clean mode source ↗

gh-146261: JIT: protect against function version changes by Fidget-Spinner · Pull Request #146300 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@Fidget-Spinner

@Fidget-Spinner Fidget-Spinner commented

Mar 22, 2026

edited

Loading

Copy link Copy Markdown

Member

This PR reverts the func_version symbol changes by using the fact that we have recorded values and _CHECK_FUNCTION_VERSION guards --- if we simply keep those around and not eliminate them, our function versions are guaranteed to be correct for all following _PUSH_FRAME if we invalidate dependencies properly in the function version changes.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>

@Fidget-Spinner

Copy link Copy Markdown

Member Author

@markshannon does this bugfix look okay to you? The reason we need this is that __code__ can be swapped out for functions. If you think it's okay, I can merge.

@Fidget-Spinner Fidget-Spinner merged commit 6f7bb29 into python:main

Apr 12, 2026

69 checks passed

prakashsellathurai added a commit to prakashsellathurai/cpython that referenced this pull request

Apr 13, 2026

ljfp pushed a commit to ljfp/cpython that referenced this pull request

Apr 25, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes

@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

@tomasr8 tomasr8 Awaiting requested review from tomasr8 tomasr8 is a code owner

@savannahostrowski savannahostrowski Awaiting requested review from savannahostrowski savannahostrowski is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Fidget-Spinner @kumaraditya303 @savannahostrowski