فهرست منبع

fix msan errors (#3724)

Mark argv as initialized so that msan doesn't complain
James Ring 4 روز پیش
والد
کامیت
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 =