8293143: Workaround for JDK-8292217 when doing "step over" of bytecode with unresolved cp reference

Reviewed-by: sspitsyn, amenkov
This commit is contained in:
Chris Plummer 2022-09-27 21:20:41 +00:00
parent 22b59b66d9
commit 6ad151d096
2 changed files with 17 additions and 7 deletions

View File

@ -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);

View File

@ -215,10 +215,15 @@ public class CLETest extends TestScaffold {
// 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;
}