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

Failing to initialize VM when running with negative value for -XX:CICompilerCount

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: hs24, hs25
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b04

      Backports

        Description

        Got asked by a member of the vulnerability team if we had a bug on this but I haven't found any.

        Running the VM with -XX:CICompilerCount=-1 -XX:-TieredCompilation will lead to creating a GrowablArray with the size -1. When doing raw_allocate for this array we use the size and the element size to calculate how much to allocate and get a native memory allocation failure. Like this:
        > java -XX:CICompilerCount=-1 -XX:-TieredCompilation
        #
        # There is insufficient memory for the Java Runtime Environment to continue.
        # Native memory allocation (malloc) failed to allocate 18446744073709551608 bytes for AllocateHeap
        # An error report file with more information is saved as:
        # /tmp/cms/reproducer/hs_err_pid28802.log

        Running with threads equal to -1 should probably not work but we should make sure we verify the input and provide a better error message.

        ILW => MLL => P5

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  anoll Albert Noll (Inactive)
                  Reporter:
                  sjohanss Stefan Johansson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: