mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-03-12 00:45:28 +00:00
fast-interp: Fix frame_offset overflow issue (#3149)
The issue was found in https://github.com/bytecodealliance/wasm-micro-runtime/issues/3137.
This commit is contained in:
parent
7cac0531ad
commit
12f834aebd
|
@ -10796,8 +10796,15 @@ re_scan:
|
|||
* Since the stack is already in polymorphic state,
|
||||
* the opcode will not be executed, so the dummy
|
||||
* offset won't cause any error */
|
||||
*loader_ctx->frame_offset++ = 0;
|
||||
if (cell_num > 1) {
|
||||
uint32 n;
|
||||
|
||||
for (n = 0; n < cell_num; n++) {
|
||||
if (loader_ctx->p_code_compiled == NULL) {
|
||||
if (!check_offset_push(loader_ctx,
|
||||
error_buf,
|
||||
error_buf_size))
|
||||
goto fail;
|
||||
}
|
||||
*loader_ctx->frame_offset++ = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5931,8 +5931,15 @@ re_scan:
|
|||
* Since the stack is already in polymorphic state,
|
||||
* the opcode will not be executed, so the dummy
|
||||
* offset won't cause any error */
|
||||
*loader_ctx->frame_offset++ = 0;
|
||||
if (cell_num > 1) {
|
||||
uint32 n;
|
||||
|
||||
for (n = 0; n < cell_num; n++) {
|
||||
if (loader_ctx->p_code_compiled == NULL) {
|
||||
if (!check_offset_push(loader_ctx,
|
||||
error_buf,
|
||||
error_buf_size))
|
||||
goto fail;
|
||||
}
|
||||
*loader_ctx->frame_offset++ = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user