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
Bug report
Bug description:
_CHECK_ATTR_CLASScallssym_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
Should install a watcher like
_GUARD_TYPE_VERSIONdoes:cpython/Python/optimizer_bytecodes.c
Lines 246 to 250 in a059e85
Found by @Fidget-Spinner in #148394 (comment)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
_CHECK_ATTR_CLASS#148399