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

C2 crash when allocating array of size too large

XMLWordPrintable

    • b29

        Following test case:

            private static int test1() {
                int length = Integer.MAX_VALUE;
                try {
                    array = new long[length];
                } catch (OutOfMemoryError outOfMemoryError) {
                    barrier = 0x42;
                    length = field;
                }
                return length;
            }

        causes c2 crash.

              roland Roland Westrelin
              roland Roland Westrelin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: