8309752: com/sun/jdi/SetLocalWhileThreadInNative.java fails with virtual test thread factory due to OpaqueFrameException
Reviewed-by: sspitsyn, lmesnik
This commit is contained in:
parent
45414fc2df
commit
1612b6dc6e
@ -30,7 +30,6 @@ com/sun/jdi/EATests.java#id0 8264699 generic-
|
||||
com/sun/jdi/ExceptionEvents.java 8278470 generic-all
|
||||
com/sun/jdi/RedefineCrossStart.java 8278470 generic-all
|
||||
com/sun/jdi/ReferrersTest.java 8285422 generic-all
|
||||
com/sun/jdi/SetLocalWhileThreadInNative.java 8285422 generic-all
|
||||
com/sun/jdi/cds/CDSBreakpointTest.java 8307778 generic-all
|
||||
com/sun/jdi/cds/CDSDeleteAllBkptsTest.java 8307778 generic-all
|
||||
com/sun/jdi/cds/CDSFieldWatchpoints.java 8307778 generic-all
|
||||
|
@ -163,13 +163,20 @@ public class SetLocalWhileThreadInNative extends TestScaffold {
|
||||
Asserts.assertEQ(frame.location().method().toString(), "SetLocalWhileThreadInNativeTarget.dontinline_testMethod()");
|
||||
List<LocalVariable> localVars = frame.visibleVariables();
|
||||
boolean changedLocal = false;
|
||||
boolean caughtOFE = false;
|
||||
for (LocalVariable lv : localVars) {
|
||||
if (lv.name().equals("zero")) {
|
||||
frame.setValue(lv, vm().mirrorOf(0)); // triggers deoptimization!
|
||||
changedLocal = true;
|
||||
try {
|
||||
frame.setValue(lv, vm().mirrorOf(0)); // triggers deoptimization!
|
||||
changedLocal = true;
|
||||
} catch (OpaqueFrameException e) {
|
||||
caughtOFE = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Asserts.assertTrue(changedLocal);
|
||||
boolean isVirtualThread = "Virtual".equals(System.getProperty("main.wrapper"));
|
||||
Asserts.assertTrue(caughtOFE == isVirtualThread);
|
||||
Asserts.assertTrue(changedLocal == !isVirtualThread);
|
||||
|
||||
// signal stop
|
||||
os.write(STOP);
|
||||
|
Loading…
x
Reference in New Issue
Block a user