From: Eric Pouech epouech@codeweavers.com
Widl segfaults in .idl header translation when inherited interface is just a forward declaration (or when the intended declaration exists but with a typo in its name).
Print an error message instead.
Signed-off-by: Eric Pouech epouech@codeweavers.com --- tools/widl/parser.y | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 54b143637cf..c612ed84c3e 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -2826,6 +2826,12 @@ static void check_all_user_types(const statement_list_t *stmts) !is_local(stmt->u.type->attrs)) { const statement_t *stmt_func; + const type_t *type = stmt->u.type; + if (type->details.iface && type->details.iface->inherit && !type_is_complete(type->details.iface->inherit)) + error_at( &type->where, + "interface %s can't inherit from incomplete interface %s\n", + type->name, type->details.iface->inherit->name); + STATEMENTS_FOR_EACH_FUNC(stmt_func, type_iface_get_stmts(stmt->u.type)) { const var_t *func = stmt_func->u.var; if (type_function_get_args(func->declspec.type))