Skip to content

Commit 964037c

Browse files
authored
feat: add support for EXTERNREF value type and enable AOT validator in fuzz tests (#4083)
1 parent 48b75e0 commit 964037c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

core/iwasm/common/wasm_runtime_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4458,8 +4458,9 @@ wasm_func_type_get_param_valkind(WASMFuncType *const func_type,
44584458
return WASM_V128;
44594459
case VALUE_TYPE_FUNCREF:
44604460
return WASM_FUNCREF;
4461-
44624461
case VALUE_TYPE_EXTERNREF:
4462+
return WASM_EXTERNREF;
4463+
44634464
case VALUE_TYPE_VOID:
44644465
default:
44654466
{

tests/fuzz/wasm-mutator-fuzz/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ endif ()
119119
# sanitizer may use kHandleSignalExclusive to handle SIGSEGV
120120
# like `UBSAN_OPTIONS=handle_segv=2:...`
121121
set (WAMR_DISABLE_HW_BOUND_CHECK 1)
122+
# Enable aot validator
123+
set (WAMR_BUILD_AOT_VALIDATOR 1)
122124

123125
set (REPO_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../../..)
124126
message([ceith]:REPO_ROOT_DIR, ${REPO_ROOT_DIR})

tests/fuzz/wasm-mutator-fuzz/wasm_mutator_fuzz.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,9 @@ execute_export_functions(wasm_module_t module, wasm_module_inst_t inst)
136136
return false;
137137
}
138138

139-
bool ret = wasm_runtime_call_wasm_a(exec_env, func, result_count,
140-
results.data(), param_count, args.data());
139+
bool ret =
140+
wasm_runtime_call_wasm_a(exec_env, func, result_count,
141+
results.data(), param_count, args.data());
141142
if (!ret) {
142143
const char *exception = wasm_runtime_get_exception(inst);
143144
if (!exception) {

0 commit comments

Comments
 (0)