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

JVM uses excessive memory with -XX:+EnableJVMCI -XX:JVMCICounterSize=2147483648

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 11, 12, 13, 14, 15
    • Fix Version/s: 15
    • Component/s: hotspot

      Description

      There should be a reasonable range check for this flag, so it doesn't use excessive memory.

      Currently, -XX:JVMCICounterSize=2147483648 is actually tested by
      runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java. However, -XX:+EnableJVMCI is not specified, so the JVM fails to launch with

      Improperly specified VM option 'JVMCICounterSize': 'EnableJVMCI' must be enabled
      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.

      However, if this test is executed with -XX:+EnableJVMCI, it will allocate so much memory that my machine will be unresponsive for about 2 minuets.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              iklam Ioi Lam
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: