Skip to content

Commit c9815ef

Browse files
authored
fix msan errors (#3724)
Mark argv as initialized so that msan doesn't complain
1 parent 6370c9e commit c9815ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/iwasm/aot/aot_runtime.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,6 +3267,10 @@ aot_invoke_native(WASMExecEnv *exec_env, uint32 func_idx, uint32 argc,
32673267
bool ret = false;
32683268
bh_assert(func_idx < aot_module->import_func_count);
32693269

3270+
#if __has_feature(memory_sanitizer)
3271+
#include <sanitizer/msan_interface.h>
3272+
__msan_unpoison(argv, (sizeof(uint32) * argc));
3273+
#endif
32703274
import_func = aot_module->import_funcs + func_idx;
32713275
if (import_func->call_conv_wasm_c_api)
32723276
func_ptr =

0 commit comments

Comments
 (0)