Rémi Bernon (@rbernon) commented about tools/widl/typetree.c:
return type; }
+static void set_constructor_runtimeclass(type_t *runtimeclass, attr_list_t *attrs) +{ + const attr_t *attr; + if (!attrs) return; + LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) + { + if (attr->type == ATTR_ACTIVATABLE || attr->type == ATTR_COMPOSABLE) + { + const expr_t *value = attr->u.pval; + if (value->u.tref.type->details.iface) + value->u.tref.type->details.iface->runtime_class = runtimeclass;
It doesn't seem safe to access expression like that. The `activatable` attribute may have an interface or not. When it has, the expression is an `EXPR_MEMBER (decl_spec, contract_req)` but when not, the expression is a `contract_req` expression only `EXPR_GTREQL (decl_spec, version)` and its decl_spec type is an apicontract, not an interface. This was enough until now, but maybe we should start using dedicated attribute values instead of abusing expressions. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8507#note_108823