mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-12 20:51:21 +00:00
Fix fast jit destroy entry/exit basic block issue in jit_cc_destroy (#1401)
The entry and exit basic blocks might be destroyed before they are created. Found by instrument test. Add checks to fix the issue.
This commit is contained in:
parent
5586f7b82d
commit
1dcc59f234
|
@ -474,7 +474,9 @@ jit_cc_destroy(JitCompContext *cc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Release entry and exit blocks. */
|
/* Release entry and exit blocks. */
|
||||||
|
if (0 != cc->entry_label)
|
||||||
jit_basic_block_delete(jit_cc_entry_basic_block(cc));
|
jit_basic_block_delete(jit_cc_entry_basic_block(cc));
|
||||||
|
if (0 != cc->exit_label)
|
||||||
jit_basic_block_delete(jit_cc_exit_basic_block(cc));
|
jit_basic_block_delete(jit_cc_exit_basic_block(cc));
|
||||||
|
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user