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
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Mar 23, 2026
…8577

* 'main' of github.com:python/cpython:
  pythongh-146197: Run -m test.pythoninfo on the Emscripten CI (python#146332)
  pythongh-146325: Use `test.support.requires_fork` in test_fastpath_cache_cleared_in_forked_child (python#146330)
  pythongh-146197: Add Emscripten to CI (python#146198)
  pythongh-143387: Raise an exception instead of returning None when metadata file is missing. (python#146234)
  pythongh-108907: ctypes: Document _type_ codes (pythonGH-145837)
  pythongh-146175: Soft-deprecate outdated macros; convert internal usage (pythonGH-146178)
  pythongh-146056: Rework ref counting in treebuilder_handle_end() (python#146167)
  Add a warning about untrusted input to `configparser` docs (python#146276)
  pythongh-145264: Do not ignore excess Base64 data after the first padded quad (pythonGH-145267)
  pythongh-146308: Fix error handling issues in _remote_debugging module (python#146309)
  pythongh-146192: Add base32 support to binascii (pythonGH-146193)
  pythongh-135953: Properly obtain main thread identifier in Gecko Collector (python#146045)
  pythongh-143414: Implement unique reference tracking for JIT, optimize unpacking of such tuples (pythonGH-144300)
  pythongh-146261: Fix bug in `_Py_uop_sym_set_func_version` (pythonGH-146291)
  pythongh-145144: Add more tests for UserList, UserDict, etc (pythonGH-145145)
  pythongh-143959: Fix test_datetime if _datetime is unavailable (pythonGH-145248)
  pythongh-146245: Fix reference and buffer leaks via audit hook in socket module (pythonGH-146248)
  pythongh-140049: Colorize exception notes in `traceback.py` (python#140051)
  Update docs for pythongh-146056 (pythonGH-146213)
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