_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
Lines 246 to 250 in a059e85
Found by @Fidget-Spinner in #148394 (comment)
CPython main branch
Linux
pythongh-148398: add type watcher in `_CHECK_ATTR_CLASS`
pythongh-148398: add NEWS
Merge branch 'main' into pythongh-148398/add-type-watcher
gh-148398: add type watcher in `_CHECK_ATTR_CLASS` (GH-148399)
pythongh-148398: add type watcher in `_CHECK_ATTR_CLASS` (pythonGH-14…
Activity
pythongh-148398: add type watcher in `_CHECK_ATTR_CLASS`
pythongh-148398: add NEWS
Merge branch 'main' into pythongh-148398/add-type-watcher
pythongh-148398: add type watcher in `_CHECK_ATTR_CLASS`
gh-148398: add type watcher in `_CHECK_ATTR_CLASS` (GH-148399)
pythongh-148398: add type watcher in `_CHECK_ATTR_CLASS` (pythonGH-14…