Skip to content

JIT: missing type watcher in _CHECK_ATTR_CLASS #148398

Closed

Description

@NekoAsakura

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.

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

Should install a watcher like _GUARD_TYPE_VERSION does:
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

Activity

  1. added
    type-bug
    on Apr 11, 2026
  2. added 3 commits that reference this issue on Apr 11, 2026
  3. added
    interpreter-core
    on Apr 11, 2026
  4. added a commit that references this issue on Apr 12, 2026
  5. added a commit that references this issue on Apr 12, 2026
  6. added a commit that references this issue on Apr 25, 2026
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-coretopic-JITtype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions