Synchronize the GC spec tests to the commit from December 9. 2024. (#4022)

- Synchronize the GC spec tests to the commit from December 9. 2024.
- Revise the error messages to be consistent with the spec test cases.
- bypass gc spec test on the nuttx platform as a workaround
This commit is contained in:
liang.he
2025-01-20 09:41:47 +08:00
committed by GitHub
parent 831e4bbfd5
commit e3ddbd58f7
10 changed files with 531 additions and 551 deletions

View File

@ -2649,7 +2649,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
read_leb_uint32(frame_ip, frame_ip_end, type_index);
func_obj = POP_REF();
if (!func_obj) {
wasm_set_exception(module, "null function object");
wasm_set_exception(module, "null function reference");
goto got_exception;
}
@ -2666,7 +2666,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
read_leb_uint32(frame_ip, frame_ip_end, type_index);
func_obj = POP_REF();
if (!func_obj) {
wasm_set_exception(module, "null function object");
wasm_set_exception(module, "null function reference");
goto got_exception;
}
@ -2813,7 +2813,8 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
struct_obj = POP_REF();
if (!struct_obj) {
wasm_set_exception(module, "null structure object");
wasm_set_exception(module,
"null structure reference");
goto got_exception;
}
@ -2869,7 +2870,8 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
struct_obj = POP_REF();
if (!struct_obj) {
wasm_set_exception(module, "null structure object");
wasm_set_exception(module,
"null structure reference");
goto got_exception;
}

View File

@ -1992,7 +1992,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
#endif
func_obj = POP_REF();
if (!func_obj) {
wasm_set_exception(module, "null function object");
wasm_set_exception(module, "null function reference");
goto got_exception;
}
@ -2007,7 +2007,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
#endif
func_obj = POP_REF();
if (!func_obj) {
wasm_set_exception(module, "null function object");
wasm_set_exception(module, "null function reference");
goto got_exception;
}
@ -2148,7 +2148,8 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
struct_obj = POP_REF();
if (!struct_obj) {
wasm_set_exception(module, "null structure object");
wasm_set_exception(module,
"null structure reference");
goto got_exception;
}
@ -2204,7 +2205,8 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
struct_obj = POP_REF();
if (!struct_obj) {
wasm_set_exception(module, "null structure object");
wasm_set_exception(module,
"null structure reference");
goto got_exception;
}

View File

@ -2139,8 +2139,9 @@ load_type_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module,
if (!wasm_type_is_subtype_of(cur_type, parent_type,
module->types,
module->type_count)) {
set_error_buf(error_buf, error_buf_size,
"sub type does not match super type");
set_error_buf_v(error_buf, error_buf_size,
"sub type %u does not match super type",
processed_type_count + j);
return false;
}
}

View File

@ -4660,7 +4660,7 @@ llvm_jit_table_init(WASMModuleInstance *module_inst, uint32 tbl_idx,
if (!(func_obj = wasm_create_func_obj(module_inst,
init_values[i].u.ref_index,
true, NULL, 0))) {
wasm_set_exception(module_inst, "null function object");
wasm_set_exception(module_inst, "null function reference");
return;
}
table_elems[i] = func_obj;