Skip to content

Commit 818604b

Browse files
committed
[GR-62734] Fix for transient issue where stack frames were null.
PullRequest: graal/20228
2 parents ee126fe + 1628547 commit 818604b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

espresso/src/com.oracle.truffle.espresso.jdwp/src/com/oracle/truffle/espresso/jdwp/impl/DebuggerController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ void stepOut(RequestFilter filter) {
409409
}
410410

411411
private void doStepOut(SuspendedInfo susp) {
412+
assert susp != null && !(susp instanceof UnknownSuspendedInfo);
412413
RootNode callerRoot = susp.getCallerRootNode();
413414
int stepOutBCI = context.getNextBCI(callerRoot, susp.getCallerFrame());
414415
SteppingInfo steppingInfo = commandRequestIds.get(susp.getThread());
@@ -1191,7 +1192,7 @@ private void continueStepping(SuspendedEvent event, SteppingInfo steppingInfo, O
11911192
break;
11921193
case STEP_OUT:
11931194
SuspendedInfo info = getSuspendedInfo(thread);
1194-
if (info != null) {
1195+
if (info != null && !(info instanceof UnknownSuspendedInfo)) {
11951196
doStepOut(info);
11961197
}
11971198
break;

espresso/src/com.oracle.truffle.espresso.jdwp/src/com/oracle/truffle/espresso/jdwp/impl/SuspendedInfo.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ public RootNode getCallerRootNode() {
7272
}
7373

7474
public Frame getCallerFrame() {
75-
return stackFrames.length > 1 ? stackFrames[1].getFrame() : null;
75+
// use getStackFrames virtual call since this.stackFrames
76+
// field can be null for unknown suspended info
77+
CallFrame[] frames = getStackFrames();
78+
return frames.length > 1 ? frames[1].getFrame() : null;
7679
}
7780

7881
public void setForceEarlyReturnInProgress() {

0 commit comments

Comments
 (0)