diff --git a/core/iwasm/interpreter/wasm_loader.c b/core/iwasm/interpreter/wasm_loader.c index 418456210..79ed996d8 100644 --- a/core/iwasm/interpreter/wasm_loader.c +++ b/core/iwasm/interpreter/wasm_loader.c @@ -9855,7 +9855,12 @@ reserve_block_ret(WASMLoaderContext *loader_ctx, uint8 opcode, else { loader_ctx->frame_offset = frame_offset; loader_ctx->dynamic_offset = dynamic_offset; - PUSH_OFFSET_TYPE(return_types[i]); + if (!(wasm_loader_push_frame_offset( + loader_ctx, return_types[i], disable_emit, + operand_offset, error_buf, error_buf_size))) { + wasm_runtime_free(emit_data); + goto fail; + } wasm_loader_emit_backspace(loader_ctx, sizeof(int16)); loader_ctx->frame_offset = frame_offset_org; loader_ctx->dynamic_offset = dynamic_offset_org; diff --git a/core/iwasm/interpreter/wasm_mini_loader.c b/core/iwasm/interpreter/wasm_mini_loader.c index a1fb3102f..4dad55523 100644 --- a/core/iwasm/interpreter/wasm_mini_loader.c +++ b/core/iwasm/interpreter/wasm_mini_loader.c @@ -5561,7 +5561,12 @@ reserve_block_ret(WASMLoaderContext *loader_ctx, uint8 opcode, else { loader_ctx->frame_offset = frame_offset; loader_ctx->dynamic_offset = dynamic_offset; - PUSH_OFFSET_TYPE(return_types[i]); + if (!(wasm_loader_push_frame_offset( + loader_ctx, return_types[i], disable_emit, + operand_offset, error_buf, error_buf_size))) { + wasm_runtime_free(emit_data); + goto fail; + } wasm_loader_emit_backspace(loader_ctx, sizeof(int16)); loader_ctx->frame_offset = frame_offset_org; loader_ctx->dynamic_offset = dynamic_offset_org;