GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — JIT: Optimization in `_CHECK_FUNCTION_VERSION` is wrong · Issue #146261 · python/cpython

JIT: Optimization in _CHECK_FUNCTION_VERSION is wrong #146261

New issue
Copy link
New issue
Copy link
Closed
Closed
JIT: Optimization in _CHECK_FUNCTION_VERSION is wrong#146261
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@Sacul0457
Sacul0457
opened on Mar 21, 2026
Issue body actions

Bug report

Bug description:

A function version may be modified midway in the trace, so we need to recheck and add a watcher in the first check.
(All credits go to @Fidget-Spinner for pointing this out, #145080 (comment))

Ken Jin suggested to restore the old optimization instead as the fix above the will result in quite bad performance, as it’s calling it on every function deallocation.
The PR will also include a tiny bugfix found in _Py_uop_sym_set_func_version

Will open a PR soon

CPython versions tested on:

3.15, CPython main branch

Operating systems tested on:

No response

Linked PRs

  • gh-146261: Fix bug in _Py_uop_sym_set_func_version #146291
  • gh-146261: JIT: protect against function version changes #146300

Activity

  1. Sacul0457
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Mar 21, 2026
  2. picnixz
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    topic-JIT
    on Mar 21, 2026
  3. Sacul0457
    changed the title [-]JIT: Function version is not re-checked in the optimizer for `_CHECK_FUNCTION_VERSION`[/-] [+]JIT: Restore previous optimization for `_CHECK_FUNCTION_VERSION`[/+] on Mar 22, 2026
  4. Fidget-Spinner
    changed the title [-]JIT: Restore previous optimization for `_CHECK_FUNCTION_VERSION`[/-] [+]JIT: Optimization in `_CHECK_FUNCTION_VERSION` is wrong[/+] on Mar 22, 2026
  5. Fidget-Spinner
    added a commit that references this issue on Mar 22, 2026

    gh-146261: Fix bug in `_Py_uop_sym_set_func_version` (GH-146291)

    1ceb1fb
  6. CuriousLearner
    added a commit that references this issue on Mar 23, 2026

    Merge branch 'main' of github.com:python/cpython into fix-pythongh-13…

    3e05fa3
  7. Fidget-Spinner
    added a commit that references this issue on Apr 12, 2026

    gh-146261: JIT: protect against function version changes (#146300)

    6f7bb29
  8. prakashsellathurai
    added a commit that references this issue on Apr 13, 2026

    Revert "pythongh-146261: JIT: protect against function version changes (

    54f801c
  9. StanFromIreland commented on Apr 19, 2026

    @StanFromIreland
    StanFromIreland
    on Apr 19, 2026
    Member
    More actions

    Triage: Can this be closed?

  10. StanFromIreland
    added
    pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
    on Apr 19, 2026
  11. Fidget-Spinner
    closed this as completedon Apr 19, 2026
  12. ljfp
    added 2 commits that reference this issue on Apr 25, 2026

    pythongh-146261: Fix bug in `_Py_uop_sym_set_func_version` (pythonGH-…

    76c5f26

    pythongh-146261: JIT: protect against function version changes (pytho…

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.