Skip to content

Commit

Permalink
Clear parent frame after restore
Browse files Browse the repository at this point in the history
This would otherwise leave the frame in an inconsistent state. Reproducer: eval and interrupt `[1 + 1] bench`.
  • Loading branch information
fniephaus committed Dec 17, 2023
1 parent eab6a14 commit d839d3b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d839d3b

Please sign in to comment.