Fix several AOT compiler issues (#2697)
- Fix potential invalid push param phis and add incoming phis to a un-existed basic block - Fix potential invalid shift count int rotl/rotr opcodes - Resize memory_data_size to UINT32_MAX if it is 4G when hw bound check is enabled - Fix negative linear memory offset is used for 64-bit target it is const and larger than INT32_MAX
This commit is contained in:
@ -338,8 +338,12 @@ memory_instantiate(WASMModuleInstance *module_inst, WASMModuleInstance *parent,
|
||||
set_error_buf(error_buf, error_buf_size, "mprotect memory failed");
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
/* Newly allocated pages are filled with zero by the OS, we don't fill it
|
||||
* again here */
|
||||
|
||||
if (memory_data_size > UINT32_MAX)
|
||||
memory_data_size = UINT32_MAX;
|
||||
#endif /* end of OS_ENABLE_HW_BOUND_CHECK */
|
||||
|
||||
memory->module_type = Wasm_Module_Bytecode;
|
||||
|
||||
Reference in New Issue
Block a user