Преглед на файлове

fix msan errors (#3724)

Mark argv as initialized so that msan doesn't complain
James Ring преди 1 месец
родител
ревизия
c9815ef2c7
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      core/iwasm/aot/aot_runtime.c

+ 4 - 0
core/iwasm/aot/aot_runtime.c

@@ -3267,6 +3267,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 <sanitizer/msan_interface.h>
+    __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 =