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: missing type watcher in _CHECK_ATTR_CLASS · Issue #148398 · python/cpython

JIT: missing type watcher in _CHECK_ATTR_CLASS #148398

New issue
Copy link
New issue
Copy link
Closed
Closed
JIT: missing type watcher in _CHECK_ATTR_CLASS#148398
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@NekoAsakura
NekoAsakura
opened on Apr 11, 2026
Issue body actions

Bug report

Bug description:

_CHECK_ATTR_CLASS calls sym_set_const(owner, type) without installing a type watcher. If the type mutates, the executor isn't invalidated.

cpython/Python/optimizer_bytecodes.c

Lines 224 to 228 in a059e85

}
else {
sym_set_const(owner, type);
}
}

Should install a watcher like _GUARD_TYPE_VERSION does:

cpython/Python/optimizer_bytecodes.c

Lines 246 to 250 in a059e85

if (sym_set_type_version(owner, type_version)) {
PyType_Watch(TYPE_WATCHER_ID, (PyObject *)type);
_Py_BloomFilter_Add(dependencies, type);
}
}

Found by @Fidget-Spinner in #148394 (comment)

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

  • gh-148398: add type watcher in _CHECK_ATTR_CLASS #148399
Reacted by Ken Jin

Activity

  1. NekoAsakura
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Apr 11, 2026
  2. NekoAsakura
    added 3 commits that reference this issue on Apr 11, 2026

    pythongh-148398: add type watcher in `_CHECK_ATTR_CLASS`

    ca70b69

    pythongh-148398: add NEWS

    6ee2de7

    Merge branch 'main' into pythongh-148398/add-type-watcher

    8cb0b3c
  3. picnixz
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    topic-JIT
    on Apr 11, 2026
  4. NekoAsakura
    added a commit that references this issue on Apr 12, 2026

    pythongh-148398: add type watcher in `_CHECK_ATTR_CLASS`

    c1eeb13
  5. Fidget-Spinner
    added a commit that references this issue on Apr 12, 2026

    gh-148398: add type watcher in `_CHECK_ATTR_CLASS` (GH-148399)

    30c698a
  6. Fidget-Spinner
    closed this as completedon Apr 12, 2026
  7. ljfp
    added a commit that references this issue on Apr 25, 2026

    pythongh-148398: add type watcher in `_CHECK_ATTR_CLASS` (pythonGH-14…

    8c88400
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)topic-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.