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