Skip to content

Commit 56ee840

Browse files
committed
fix: add check for thread termination after function call in AOT mode
1 parent fcb1f0c commit 56ee840

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

core/iwasm/compilation/aot_emit_function.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,14 @@ aot_compile_op_call(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
857857
goto fail;
858858
}
859859

860+
#if WASM_ENABLE_THREAD_MGR != 0
861+
/* Insert suspend check point */
862+
if (comp_ctx->enable_thread_mgr) {
863+
if (!check_suspend_flags(comp_ctx, func_ctx))
864+
return false;
865+
}
866+
#endif
867+
860868
/* Check whether there was exception thrown when executing
861869
the function */
862870
if (!check_exception_thrown(comp_ctx, func_ctx)) {

0 commit comments

Comments
 (0)