Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8329533

TestCDSVMCrash fails on libgraal

XMLWordPrintable

    • b18

        java.lang.Error: Expected VM to crash
                at TestCDSVMCrash.main(TestCDSVMCrash.java:59)
                at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
                at java.base/java.lang.reflect.Method.invoke(Method.java:580)
                at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
                at java.base/java.lang.Thread.run(Thread.java:1575)


        This part of the test looks suspicious to me:

        // This should guarantee to throw:
        // java.lang.OutOfMemoryError: Requested array size exceeds VM limit
        try {
            Object[] oa = new Object[Integer.MAX_VALUE];
            throw new Error("OOME not triggered");
        } catch (OutOfMemoryError err) {
            throw new Error("OOME didn't abort JVM!");
        }

        Escape analysis can eliminate the allocation altogether.

        This started failing with https://bugs.openjdk.org/browse/JDK-8321550 according to [~mikael].

              matsaave Matias Saavedra Silva
              dnsimon Douglas Simon
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: