< prev index next >

test/compiler/rangechecks/TestRangeCheckSmearing.java

Print this page

        

*** 26,36 **** * @bug 8066103 * @summary C2's range check smearing allows out of bound array accesses * @library /testlibrary /test/lib / * @modules java.base/jdk.internal.misc * java.management - * @ignore 8157984 * @build TestRangeCheckSmearing * @run driver ClassFileInstaller sun.hotspot.WhiteBox * jdk.test.lib.Platform * @run main/othervm -ea -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:-BackgroundCompilation -XX:-UseOnStackReplacement TestRangeCheckSmearing --- 26,35 ----
*** 42,51 **** --- 41,51 ---- import java.util.*; import sun.hotspot.WhiteBox; import sun.hotspot.code.NMethod; import jdk.test.lib.Platform; import compiler.whitebox.CompilerWhiteBoxTest; + import compiler.testlibrary.CompilerUtils; public class TestRangeCheckSmearing { private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); @Retention(RetentionPolicy.RUNTIME)
*** 394,404 **** } if (!exception) { System.out.println("ArrayIndexOutOfBoundsException was not thrown in "+name); } ! if (Platform.isServer()) { if (exceptionRequired == WHITE_BOX.isMethodCompiled(m)) { System.out.println((exceptionRequired?"Didn't deoptimized":"deoptimized") + " in "+name); test_success = false; } } --- 394,404 ---- } if (!exception) { System.out.println("ArrayIndexOutOfBoundsException was not thrown in "+name); } ! if (CompilerUtils.getMaxCompilationLevel() == CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION) { if (exceptionRequired == WHITE_BOX.isMethodCompiled(m)) { System.out.println((exceptionRequired?"Didn't deoptimized":"deoptimized") + " in "+name); test_success = false; } }
< prev index next >