소스 검색

Fix compilation errors (#3549)

The compilation errors were introduced by #3515 and occur in debug building
when wasm mini loader is compiled or GC is enabled.

And remove two wasm files in standalone test-running-modes case,
which will be generated by run.sh.
Wenyong Huang 1 년 전
부모
커밋
9b9e938bee

+ 2 - 2
core/iwasm/compilation/aot_emit_aot_file.c

@@ -1977,7 +1977,7 @@ aot_emit_table_info(uint8 *buf, uint8 *buf_end, uint32 *p_offset,
         if (comp_ctx->enable_gc
             && comp_data->import_tables[i].table_type.elem_ref_type) {
             bh_assert(wasm_is_type_multi_byte_type(
-                comp_data->import_tables[i].elem_type));
+                comp_data->import_tables[i].table_type.elem_type));
             EMIT_U32(comp_data->import_tables[i]
                          .table_type.elem_ref_type->ref_ht_common.heap_type);
         }
@@ -2009,7 +2009,7 @@ aot_emit_table_info(uint8 *buf, uint8 *buf_end, uint32 *p_offset,
         if (comp_ctx->enable_gc) {
             if (comp_data->tables[i].table_type.elem_ref_type) {
                 bh_assert(wasm_is_type_multi_byte_type(
-                    comp_data->tables[i].elem_type));
+                    comp_data->tables[i].table_type.elem_type));
                 EMIT_U32(
                     comp_data->tables[i]
                         .table_type.elem_ref_type->ref_ht_common.heap_type);

+ 1 - 1
core/iwasm/interpreter/wasm_mini_loader.c

@@ -684,7 +684,7 @@ load_table_import(const uint8 **p_buf, const uint8 *buf_end,
     read_leb_uint32(p, p_end, declare_init_size);
     if (declare_max_size_flag & 1) {
         read_leb_uint32(p, p_end, declare_max_size);
-        bh_assert(table->init_size <= table->max_size);
+        bh_assert(table->table_type.init_size <= table->table_type.max_size);
     }
 
     adjust_table_max_size(declare_init_size, declare_max_size_flag,

BIN
tests/standalone/test-running-modes/wasm-apps/hello.wasm


BIN
tests/standalone/test-running-modes/wasm-apps/mytest.wasm