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

C2 crash when allocating array of size too large

    XMLWordPrintable

Details

    • b29

    Backports

      Description

        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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: