Implement wasm-c-api frame/trap APIs for interpreter mode (#660)
And enable to cache compiled AOT file buffer for wasm-c-api JIT mode Avoid checks that rely on undefined C behavior Fix issues of wasm-c-api sample trap and callback_chain Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
@ -1896,7 +1896,7 @@ aot_validate_app_addr(AOTModuleInstance *module_inst,
|
||||
}
|
||||
|
||||
/* integer overflow check */
|
||||
if(app_offset + size < app_offset) {
|
||||
if(app_offset > UINT32_MAX - size) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -1920,7 +1920,7 @@ aot_validate_native_addr(AOTModuleInstance *module_inst,
|
||||
}
|
||||
|
||||
/* integer overflow check */
|
||||
if (addr + size < addr) {
|
||||
if ((uintptr_t)addr > UINTPTR_MAX - size) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user