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:
@ -3014,9 +3014,9 @@ static const char *exception_msgs[] = {
|
||||
"wasm operand stack overflow", /* EXCE_OPERAND_STACK_OVERFLOW */
|
||||
"failed to compile fast jit function", /* EXCE_FAILED_TO_COMPILE_FAST_JIT_FUNC */
|
||||
/* GC related exceptions */
|
||||
"null function object", /* EXCE_NULL_FUNC_OBJ */
|
||||
"null structure object", /* EXCE_NULL_STRUCT_OBJ */
|
||||
"null array reference", /* EXCE_NULL_ARRAY_OBJ */
|
||||
"null function reference", /* EXCE_NULL_FUNC_OBJ */
|
||||
"null structure reference", /* EXCE_NULL_STRUCT_OBJ */
|
||||
"null array reference", /* EXCE_NULL_ARRAY_OBJ */
|
||||
"null i31 reference", /* EXCE_NULL_I31_OBJ */
|
||||
"null reference", /* EXCE_NULL_REFERENCE */
|
||||
"create rtt type failed", /* EXCE_FAILED_TO_CREATE_RTT_TYPE */
|
||||
@ -3024,7 +3024,7 @@ static const char *exception_msgs[] = {
|
||||
"create array object failed", /* EXCE_FAILED_TO_CREATE_ARRAY_OBJ */
|
||||
"create externref object failed", /* EXCE_FAILED_TO_CREATE_EXTERNREF_OBJ */
|
||||
"cast failure", /* EXCE_CAST_FAILURE */
|
||||
"out of bounds array access", /* EXCE_ARRAY_IDX_OOB */
|
||||
"out of bounds array access", /* EXCE_ARRAY_IDX_OOB */
|
||||
/* stringref related exceptions */
|
||||
"create string object failed", /* EXCE_FAILED_TO_CREATE_STRING */
|
||||
"create stringref failed", /* EXCE_FAILED_TO_CREATE_STRINGREF */
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user