Skip to content

Commit 591b740

Browse files
authored
Consume the placeholders that were put when emitting table info (#3940)
1 parent c32a6ce commit 591b740

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

core/iwasm/aot/aot_loader.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,12 @@ load_import_table_list(const uint8 **p_buf, const uint8 *buf_end,
13331333
if (wasm_is_type_multi_byte_type(import_table->table_type.elem_type)) {
13341334
read_uint8(buf, buf_end, ref_type.ref_ht_common.nullable);
13351335
}
1336+
else
13361337
#endif
1338+
{
1339+
/* Skip 1 byte */
1340+
buf += 1;
1341+
}
13371342
read_uint32(buf, buf_end, import_table->table_type.init_size);
13381343
read_uint32(buf, buf_end, import_table->table_type.max_size);
13391344
#if WASM_ENABLE_GC != 0
@@ -1393,7 +1398,12 @@ load_table_list(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,
13931398
if (wasm_is_type_multi_byte_type(table->table_type.elem_type)) {
13941399
read_uint8(buf, buf_end, ref_type.ref_ht_common.nullable);
13951400
}
1401+
else
13961402
#endif
1403+
{
1404+
/* Skip 1 byte */
1405+
buf += 1;
1406+
}
13971407
read_uint32(buf, buf_end, table->table_type.init_size);
13981408
read_uint32(buf, buf_end, table->table_type.max_size);
13991409
#if WASM_ENABLE_GC != 0
@@ -1481,7 +1491,7 @@ load_table_init_data_list(const uint8 **p_buf, const uint8 *buf_end,
14811491
else
14821492
#endif
14831493
{
1484-
/* Skip 8 byte for ref type info */
1494+
/* Skip 8 byte(2+2+4) for ref type info */
14851495
buf += 8;
14861496
}
14871497

0 commit comments

Comments
 (0)