Implement aux stack overflow/underflow check for AOT/interp (#601)

This commit is contained in:
Wenyong Huang
2021-04-07 16:15:59 +08:00
committed by GitHub
parent fe76c89c25
commit 77c3ddf7d0
18 changed files with 242 additions and 45 deletions

View File

@ -336,8 +336,12 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index)
break;
case WASM_OP_SET_GLOBAL:
case WASM_OP_SET_GLOBAL_64:
case WASM_OP_SET_GLOBAL_AUX_STACK:
read_leb_uint32(frame_ip, frame_ip_end, global_idx);
if (!aot_compile_op_set_global(comp_ctx, func_ctx, global_idx))
if (!aot_compile_op_set_global(comp_ctx, func_ctx, global_idx,
opcode == WASM_OP_SET_GLOBAL_AUX_STACK
? true : false))
return false;
break;