Skip to content

Commit

Permalink
fix: when load aot init expr,no type_idx set. (#4094)
Browse files Browse the repository at this point in the history
Fix an assertion from *gc_object.c line 91*  `bh_assert(rtt_type->type_flag == WASM_TYPE_STRUCT;`
  • Loading branch information
chenliuyang1989 authored Feb 21, 2025
1 parent f2ef9ee commit d9c01b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/iwasm/aot/aot_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d9c01b3

Please sign in to comment.