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
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test |
aoqi@0 | 3 | * @bug 6894807 |
aoqi@0 | 4 | * @summary No ClassCastException for HashAttributeSet constructors if run with -Xcomp |
aoqi@0 | 5 | * @compile IsInstanceTest.java |
aoqi@0 | 6 | * @run shell Test6894807.sh |
aoqi@0 | 7 | */ |
aoqi@0 | 8 | |
aoqi@0 | 9 | public class IsInstanceTest { |
aoqi@0 | 10 | |
aoqi@0 | 11 | public static void main(String[] args) { |
aoqi@0 | 12 | BaseInterface baseInterfaceImpl = new BaseInterfaceImpl(); |
aoqi@0 | 13 | for (int i = 0; i < 100000; i++) { |
aoqi@0 | 14 | if (isInstanceOf(baseInterfaceImpl, ExtendedInterface.class)) { |
aoqi@0 | 15 | System.out.println("Failed at index:" + i); |
aoqi@0 | 16 | System.out.println("Arch: "+System.getProperty("os.arch", "")+ |
aoqi@0 | 17 | " OS: "+System.getProperty("os.name", "")+ |
aoqi@0 | 18 | " OSV: "+System.getProperty("os.version", "")+ |
aoqi@0 | 19 | " Cores: "+Runtime.getRuntime().availableProcessors()+ |
aoqi@0 | 20 | " JVM: "+System.getProperty("java.version", "")+" "+System.getProperty("sun.arch.data.model", "")); |
aoqi@0 | 21 | break; |
aoqi@0 | 22 | } |
aoqi@0 | 23 | } |
aoqi@0 | 24 | System.out.println("Done!"); |
aoqi@0 | 25 | } |
aoqi@0 | 26 | |
aoqi@0 | 27 | public static boolean isInstanceOf(BaseInterface baseInterfaceImpl, Class... baseInterfaceClasses) { |
aoqi@0 | 28 | for (Class baseInterfaceClass : baseInterfaceClasses) { |
aoqi@0 | 29 | if (baseInterfaceClass.isInstance(baseInterfaceImpl)) { |
aoqi@0 | 30 | return true; |
aoqi@0 | 31 | } |
aoqi@0 | 32 | } |
aoqi@0 | 33 | return false; |
aoqi@0 | 34 | } |
aoqi@0 | 35 | |
aoqi@0 | 36 | private interface BaseInterface { |
aoqi@0 | 37 | } |
aoqi@0 | 38 | |
aoqi@0 | 39 | private interface ExtendedInterface extends BaseInterface { |
aoqi@0 | 40 | } |
aoqi@0 | 41 | |
aoqi@0 | 42 | private static class BaseInterfaceImpl implements BaseInterface { |
aoqi@0 | 43 | } |
aoqi@0 | 44 | } |