mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-12 04:31:14 +00:00
Fix fast jit destroy block issue (#1412)
Only destroy the block if it hasn't been pushed into the block stack, or it will be destroyed again when destroying the block stack.
This commit is contained in:
parent
ebcbe0b571
commit
903a27aff2
|
@ -807,7 +807,11 @@ jit_compile_op_block(JitCompContext *cc, uint8 **p_frame_ip,
|
|||
|
||||
return true;
|
||||
fail:
|
||||
jit_block_destroy(block);
|
||||
/* Only destroy the block if it hasn't been pushed into
|
||||
the block stack, or if will be destroyed again when
|
||||
destroying the block stack */
|
||||
if (jit_block_stack_top(&cc->block_stack) != block)
|
||||
jit_block_destroy(block);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user