Skip to content

Commit 13788c3

Browse files
committed
fix: add suspend flags check in AOT mode
1 parent 66eeb4e commit 13788c3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/iwasm/compilation/aot_emit_memory.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "aot_emit_exception.h"
88
#include "../aot/aot_runtime.h"
99
#include "aot_intrinsic.h"
10+
#include "aot_emit_control.h"
1011

1112
#define BUILD_ICMP(op, left, right, res, name) \
1213
do { \
@@ -1344,6 +1345,14 @@ aot_compile_op_atomic_wait(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
13441345
return false;
13451346
}
13461347

1348+
#if WASM_ENABLE_THREAD_MGR != 0
1349+
/* Insert suspend check point */
1350+
if (comp_ctx->enable_thread_mgr) {
1351+
if (!check_suspend_flags(comp_ctx, func_ctx))
1352+
return false;
1353+
}
1354+
#endif
1355+
13471356
BUILD_ICMP(LLVMIntSGT, ret_value, I32_ZERO, cmp, "atomic_wait_ret");
13481357

13491358
ADD_BASIC_BLOCK(wait_fail, "atomic_wait_fail");

0 commit comments

Comments
 (0)