Enhance GC subtyping checks (#3317)

Enhance the GC subtyping checks:
- Fix issues in the type equivalence check
- Enable the recursive type subtyping check
- Add a equivalence type flag in defined types of aot file, if there is an
  equivalence type before, just set it true and re-use the previous type
- Normalize the defined types for interpreter and AOT
- Enable spec test case type-equivalence.wast and type-subtyping.wast,
  and enable some commented cases
- Enable set WAMR_BUILD_SANITIZER from cmake variable
This commit is contained in:
Wenyong Huang
2024-04-18 12:32:01 +08:00
committed by GitHub
parent d39d2ba3ca
commit 68bd30c6f9
21 changed files with 585 additions and 477 deletions

View File

@ -1736,8 +1736,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
goto got_exception;
}
#else
if (cur_type->min_type_idx_normalized
!= cur_func_type->min_type_idx_normalized) {
if (!wasm_func_type_is_super_of(cur_type, cur_func_type)) {
wasm_set_exception(module, "indirect call type mismatch");
goto got_exception;
}