Skip to content

Commit 5a8f5e2

Browse files
woessbulasevich
authored andcommitted
Add missing Truffle Safepoint poll in Wasm interpreter loop.
(cherry picked from commit 7a6e19a38d8ab0f12a605aab6411438b6fd47e7c)
1 parent adf733c commit 5a8f5e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/nodes/WasmFunctionNode.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
import com.oracle.truffle.api.ExactMath;
9797
import com.oracle.truffle.api.HostCompilerDirectives.BytecodeInterpreterSwitch;
9898
import com.oracle.truffle.api.TruffleContext;
99+
import com.oracle.truffle.api.TruffleSafepoint;
99100
import com.oracle.truffle.api.frame.Frame;
100101
import com.oracle.truffle.api.frame.VirtualFrame;
101102
import com.oracle.truffle.api.nodes.BytecodeOSRNode;
@@ -370,6 +371,7 @@ public Object executeBodyFromOffset(WasmContext context, WasmInstance instance,
370371
break;
371372
}
372373
case Bytecode.LOOP: {
374+
TruffleSafepoint.poll(this);
373375
if (CompilerDirectives.hasNextTier() && ++backEdgeCounter.count >= REPORT_LOOP_STRIDE) {
374376
LoopNode.reportLoopCount(this, REPORT_LOOP_STRIDE);
375377
backEdgeCounter.count = 0;

0 commit comments

Comments
 (0)