From 0cfe3ce45255f5b8a0772056ae46ded608cf2948 Mon Sep 17 00:00:00 2001 From: James Ring Date: Wed, 14 Aug 2024 16:09:06 -0700 Subject: [PATCH] fix msan errors Mark argv as initialized so that msan doesn't complain --- core/iwasm/aot/aot_runtime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/iwasm/aot/aot_runtime.c b/core/iwasm/aot/aot_runtime.c index 7e8799e05..cabdf9e23 100644 --- a/core/iwasm/aot/aot_runtime.c +++ b/core/iwasm/aot/aot_runtime.c @@ -2840,6 +2840,10 @@ aot_invoke_native(WASMExecEnv *exec_env, uint32 func_idx, uint32 argc, bool ret = false; bh_assert(func_idx < aot_module->import_func_count); +#if __has_feature(memory_sanitizer) +#include + __msan_unpoison(argv, (sizeof(uint32) * argc)); +#endif import_func = aot_module->import_funcs + func_idx; if (import_func->call_conv_wasm_c_api) func_ptr =