Fix warnings/issues reported in Windows and by CodeQL/Coverity (#3275)
Fix the warnings and issues reported: - in Windows platform - by CodeQL static code analyzing - by Coverity static code analyzing And update CodeQL script to build exception handling and memory features.
This commit is contained in:
@ -1123,7 +1123,8 @@ posix_memalign_wrapper(wasm_exec_env_t exec_env, void **memptr, int32 align,
|
||||
wasm_module_inst_t module_inst = get_module_inst(exec_env);
|
||||
void *p = NULL;
|
||||
|
||||
*((int32 *)memptr) = module_malloc(size, (void **)&p);
|
||||
/* TODO: for memory 64, module_malloc may return uint64 offset */
|
||||
*((uint32 *)memptr) = (uint32)module_malloc(size, (void **)&p);
|
||||
if (!p)
|
||||
return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user