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:
@ -981,8 +981,10 @@ 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);
|
||||
bh_assert(!(local_type_index + sub_local_count <= local_type_index
|
||||
|| local_type_index + sub_local_count > local_count));
|
||||
bh_assert(sub_local_count
|
||||
&& local_type_index <= UINT32_MAX - sub_local_count
|
||||
&& local_type_index + sub_local_count
|
||||
<= local_count);
|
||||
|
||||
CHECK_BUF(p_code, buf_code_end, 1);
|
||||
/* 0x7F/0x7E/0x7D/0x7C */
|
||||
|
||||
Reference in New Issue
Block a user