Skip to content

Commit

Permalink
8293143: Workaround for JDK-8292217 when doing "step over" of bytecod…
Browse files Browse the repository at this point in the history
…e with unresolved cp reference

Reviewed-by: sspitsyn, amenkov
  • Loading branch information
plummercj committed Sep 27, 2022
1 parent 22b59b6 commit 6ad151d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
11 changes: 8 additions & 3 deletions src/jdk.jdwp.agent/share/native/libjdwp/eventHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,14 @@ deferEventReport(JNIEnv *env, jthread thread,
jlocation end;
error = methodLocation(method, &start, &end);
if (error == JVMTI_ERROR_NONE) {
deferring = isBreakpointSet(clazz, method, start) ||
threadControl_getInstructionStepMode(thread)
== JVMTI_ENABLE;
if (isBreakpointSet(clazz, method, start)) {
deferring = JNI_TRUE;
} else {
StepRequest* step = threadControl_getStepRequest(thread);
if (step->pending && step->depth == JDWP_STEP_DEPTH(INTO)) {
deferring = JNI_TRUE;
}
}
if (!deferring) {
threadControl_saveCLEInfo(env, thread, ei,
clazz, method, start);
Expand Down
13 changes: 9 additions & 4 deletions test/jdk/com/sun/jdi/CLETest.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,15 @@ public void eventSetReceived(EventSet set) {
// more than one Event in it.
if (set.size() != 1) {
testcaseFailed = true;
// For now, we expect these two test cases to fail due to 8292217,
// so don't fail the overall test run as a result of these failures.
// testFailed = true;
System.out.println("TESTCASE #" + testcase + " FAILED (ignoring): too many events in EventSet: " + set.size());
// For now, we expect the 2nd test cases to fail due to 8292217,
// so don't fail the overall test run as a result of this failure.
// There is a workaround in place that allows the 1st test case to pass.
if (testcase == 1) {
testFailed = true;
}
System.out.println("TESTCASE #" + testcase + " FAILED" +
(testcase == 2 ? "(ignoring)" : "") +
": too many events in EventSet: " + set.size());
}
break;
}
Expand Down

1 comment on commit 6ad151d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.