Mon, 28 Jul 2014 15:06:38 -0700
8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn
1 /*
2 * @test
3 * @bug 6894807
4 * @summary No ClassCastException for HashAttributeSet constructors if run with -Xcomp
5 * @compile IsInstanceTest.java
6 * @run shell Test6894807.sh
7 */
9 public class IsInstanceTest {
11 public static void main(String[] args) {
12 BaseInterface baseInterfaceImpl = new BaseInterfaceImpl();
13 for (int i = 0; i < 100000; i++) {
14 if (isInstanceOf(baseInterfaceImpl, ExtendedInterface.class)) {
15 System.out.println("Failed at index:" + i);
16 System.out.println("Arch: "+System.getProperty("os.arch", "")+
17 " OS: "+System.getProperty("os.name", "")+
18 " OSV: "+System.getProperty("os.version", "")+
19 " Cores: "+Runtime.getRuntime().availableProcessors()+
20 " JVM: "+System.getProperty("java.version", "")+" "+System.getProperty("sun.arch.data.model", ""));
21 break;
22 }
23 }
24 System.out.println("Done!");
25 }
27 public static boolean isInstanceOf(BaseInterface baseInterfaceImpl, Class... baseInterfaceClasses) {
28 for (Class baseInterfaceClass : baseInterfaceClasses) {
29 if (baseInterfaceClass.isInstance(baseInterfaceImpl)) {
30 return true;
31 }
32 }
33 return false;
34 }
36 private interface BaseInterface {
37 }
39 private interface ExtendedInterface extends BaseInterface {
40 }
42 private static class BaseInterfaceImpl implements BaseInterface {
43 }
44 }