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:
@ -554,8 +554,12 @@ memory_instantiate(AOTModuleInstance *module_inst, AOTModuleInstance *parent,
|
||||
os_munmap(mapped_mem, map_size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* 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_inst->module_type = Wasm_Module_AoT;
|
||||
|
||||
Reference in New Issue
Block a user