From d9c01b39d11a068558363b20be39c7364d871322 Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 21 Feb 2025 15:33:36 +0800 Subject: [PATCH] fix: when load aot init expr,no type_idx set. (#4094) Fix an assertion from *gc_object.c line 91* `bh_assert(rtt_type->type_flag == WASM_TYPE_STRUCT;` --- core/iwasm/aot/aot_loader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/iwasm/aot/aot_loader.c b/core/iwasm/aot/aot_loader.c index 97360e73e..0ba3de7bd 100644 --- a/core/iwasm/aot/aot_loader.c +++ b/core/iwasm/aot/aot_loader.c @@ -1251,6 +1251,7 @@ load_init_expr(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module, } free_if_fail = true; init_values->count = field_count; + init_values->type_idx = type_idx; expr->u.data = init_values; if (type_idx >= module->type_count) {