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:
@ -1950,7 +1950,8 @@ load_function_section(const uint8 *buf, const uint8 *buf_end,
|
||||
local_type_index = 0;
|
||||
for (j = 0; j < local_set_count; j++) {
|
||||
read_leb_uint32(p_code, buf_code_end, sub_local_count);
|
||||
if (local_type_index + sub_local_count <= local_type_index
|
||||
if (!sub_local_count
|
||||
|| local_type_index > UINT32_MAX - sub_local_count
|
||||
|| local_type_index + sub_local_count > local_count) {
|
||||
set_error_buf(error_buf, error_buf_size,
|
||||
"invalid local count");
|
||||
|
||||
Reference in New Issue
Block a user