The `STORE_ATTR_INSTANCE_VALUE` opcode doesn't support objects with
non-NULL managed dictionaries, so don't specialize to that op in that case.
return 0;
}
_PyAttrCache *cache = (_PyAttrCache *)(instr + 1);
- if (type->tp_flags & Py_TPFLAGS_INLINE_VALUES && _PyObject_InlineValues(owner)->valid) {
+ if (type->tp_flags & Py_TPFLAGS_INLINE_VALUES &&
+ _PyObject_InlineValues(owner)->valid &&
+ !(base_op == STORE_ATTR && _PyObject_GetManagedDict(owner) != NULL))
+ {
PyDictKeysObject *keys = ((PyHeapTypeObject *)type)->ht_cached_keys;
assert(PyUnicode_CheckExact(name));
Py_ssize_t index = _PyDictKeys_StringLookup(keys, name);