From d839d3b1a0a16c0fabebfd1b621cd5dbca81123d Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Sun, 17 Dec 2023 22:46:34 +0100 Subject: [PATCH] Clear parent frame after restore This would otherwise leave the frame in an inconsistent state. Reproducer: eval and interrupt `[1 + 1] bench`. --- .../src/de/hpi/swa/trufflesqueak/util/FrameAccess.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/util/FrameAccess.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/util/FrameAccess.java index 0062471c4..a48064465 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/util/FrameAccess.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/util/FrameAccess.java @@ -145,7 +145,9 @@ public static Object[] storeParentFrameInArguments(final VirtualFrame parentFram } public static Frame restoreParentFrameFromArguments(final Object[] arguments) { - return (Frame) arguments[ArgumentIndicies.CLOSURE_OR_NULL.ordinal()]; + Object frame = arguments[ArgumentIndicies.CLOSURE_OR_NULL.ordinal()]; + arguments[ArgumentIndicies.CLOSURE_OR_NULL.ordinal()] = null; + return (Frame) frame; } public static Object getReceiver(final Frame frame) {