mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-03-11 16:35:33 +00:00
Fix loader and mini-loader select potiential error (#3374)
Fix the issue reported in https://github.com/bytecodealliance/wasm-micro-runtime/issues/3361.
This commit is contained in:
parent
e11eae93e2
commit
79ae910a7c
|
@ -12041,6 +12041,7 @@ re_scan:
|
|||
switch (*(loader_ctx->frame_ref - 1)) {
|
||||
case VALUE_TYPE_I32:
|
||||
case VALUE_TYPE_F32:
|
||||
case VALUE_TYPE_ANY:
|
||||
break;
|
||||
case VALUE_TYPE_I64:
|
||||
case VALUE_TYPE_F64:
|
||||
|
|
|
@ -4240,7 +4240,7 @@ wasm_loader_pop_frame_ref(WASMLoaderContext *ctx, uint8 type, char *error_buf,
|
|||
ctx->frame_ref--;
|
||||
ctx->stack_cell_num--;
|
||||
|
||||
if (is_32bit_type(type))
|
||||
if (is_32bit_type(type) || *ctx->frame_ref == VALUE_TYPE_ANY)
|
||||
return true;
|
||||
|
||||
ctx->frame_ref--;
|
||||
|
@ -6696,6 +6696,7 @@ re_scan:
|
|||
switch (*(loader_ctx->frame_ref - 1)) {
|
||||
case REF_I32:
|
||||
case REF_F32:
|
||||
case REF_ANY:
|
||||
break;
|
||||
case REF_I64_2:
|
||||
case REF_F64_2:
|
||||
|
|
Loading…
Reference in New Issue
Block a user