Skip to content

gh-146261: Fix bug in _Py_uop_sym_set_func_version#146291

Merged
Fidget-Spinner merged 2 commits intopython:mainfrom
Sacul0457:Restore-CHECK_FUNCTION-VERSION-Opt
Mar 22, 2026
Merged

gh-146261: Fix bug in _Py_uop_sym_set_func_version#146291
Fidget-Spinner merged 2 commits intopython:mainfrom
Sacul0457:Restore-CHECK_FUNCTION-VERSION-Opt

Conversation

@Sacul0457
Copy link
Contributor

@Sacul0457 Sacul0457 commented Mar 22, 2026

Fixes a bug in _Py_uop_sym_set_func_version where it should return false instead of true when we hit the bottom.

case JIT_SYM_TRUTHINESS_TAG:
sym_set_bottom(ctx, sym);
return true;
return false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, can you just reduce the PR to just this line? I'm really sorry for taking up your time on this Sacul.

After staring at this more, I realised the original function watcher idea works, but needs a lot more work. I think this might be too complicated for a contributor to take, so I'll take over. Thanks for opening the issue again and for spotting this mistake of mine!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, glad to be able to help where I can :)

@Sacul0457 Sacul0457 changed the title gh-146261: Restore Optimization of _CHECK_FUNCTION_VERSION in the JIT gh-146261: Fix bug in _Py_uop_sym_set_func_version Mar 22, 2026
Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Fidget-Spinner Fidget-Spinner merged commit 1ceb1fb into python:main Mar 22, 2026
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants