mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
Fix block with type issue in fast interp (#2866)
Reported in https://github.com/bytecodealliance/wasm-micro-runtime/issues/2863.
This commit is contained in:
parent
23c1343fb3
commit
53c3fa27d4
|
@ -7199,10 +7199,7 @@ re_scan:
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WASM_ENABLE_FAST_INTERP != 0
|
#if WASM_ENABLE_FAST_INTERP != 0
|
||||||
if (opcode == WASM_OP_BLOCK) {
|
if (opcode == WASM_OP_BLOCK || opcode == WASM_OP_LOOP) {
|
||||||
skip_label();
|
|
||||||
}
|
|
||||||
else if (opcode == WASM_OP_LOOP) {
|
|
||||||
skip_label();
|
skip_label();
|
||||||
if (BLOCK_HAS_PARAM(block_type)) {
|
if (BLOCK_HAS_PARAM(block_type)) {
|
||||||
/* Make sure params are in dynamic space */
|
/* Make sure params are in dynamic space */
|
||||||
|
@ -7210,8 +7207,10 @@ re_scan:
|
||||||
loader_ctx, false, error_buf, error_buf_size))
|
loader_ctx, false, error_buf, error_buf_size))
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
(loader_ctx->frame_csp - 1)->code_compiled =
|
if (opcode == WASM_OP_LOOP) {
|
||||||
loader_ctx->p_code_compiled;
|
(loader_ctx->frame_csp - 1)->code_compiled =
|
||||||
|
loader_ctx->p_code_compiled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (opcode == WASM_OP_IF) {
|
else if (opcode == WASM_OP_IF) {
|
||||||
/* If block has parameters, we should make sure they are in
|
/* If block has parameters, we should make sure they are in
|
||||||
|
|
|
@ -5627,10 +5627,7 @@ re_scan:
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WASM_ENABLE_FAST_INTERP != 0
|
#if WASM_ENABLE_FAST_INTERP != 0
|
||||||
if (opcode == WASM_OP_BLOCK) {
|
if (opcode == WASM_OP_BLOCK || opcode == WASM_OP_LOOP) {
|
||||||
skip_label();
|
|
||||||
}
|
|
||||||
else if (opcode == WASM_OP_LOOP) {
|
|
||||||
skip_label();
|
skip_label();
|
||||||
if (BLOCK_HAS_PARAM(block_type)) {
|
if (BLOCK_HAS_PARAM(block_type)) {
|
||||||
/* Make sure params are in dynamic space */
|
/* Make sure params are in dynamic space */
|
||||||
|
@ -5638,8 +5635,10 @@ re_scan:
|
||||||
loader_ctx, false, error_buf, error_buf_size))
|
loader_ctx, false, error_buf, error_buf_size))
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
(loader_ctx->frame_csp - 1)->code_compiled =
|
if (opcode == WASM_OP_LOOP) {
|
||||||
loader_ctx->p_code_compiled;
|
(loader_ctx->frame_csp - 1)->code_compiled =
|
||||||
|
loader_ctx->p_code_compiled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (opcode == WASM_OP_IF) {
|
else if (opcode == WASM_OP_IF) {
|
||||||
/* If block has parameters, we should make sure they are in
|
/* If block has parameters, we should make sure they are in
|
||||||
|
|
Loading…
Reference in New Issue
Block a user