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

Java 9 process negative MaxTenuringThreshold in different way than Java 8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 9
    • 9
    • hotspot
    • gc
    • b64

        Fix for JDK-6521376 add explicit processing of MaxTenuringThreshold XX option. When bad value for MaxTenuringThreshold is passed(e.g. negative value for unsigned option "-XX:MaxTenuringThreshold=-1"), then function print warning and continue execution with default value(0).

        This behavior differs from Java 8. Java 8 process this situation in common way for unsigned options, i.e. print waring and reports a error.

        Example:
        1) Java 8u40
        java -XX:MaxTenuringThreshold=-1 -version
        Improperly specified VM option 'MaxTenuringThreshold=-1'
        Error: Could not create the Java Virtual Machine.
        Error: A fatal exception has occurred. Program will exit.

        2) Java 9 b55
        java -XX:MaxTenuringThreshold=-1 -version
        Invalid MaxTenuringThreshold: -XX:MaxTenuringThreshold=-1
        java version "1.9.0-ea"
        Java(TM) SE Runtime Environment (build 1.9.0-ea-b55)
        Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b55, mixed mode)

        As we see, Java 8u40 and Java 9 b55 reports about wrong option value, but Java 8u40 exit with error and Java 9 b55 successfully exit.

        So, Java 9 behavior must be corrected to match the common behavior(exit JVM and print common error message)

              ddmitriev Dmitry Dmitriev
              ddmitriev Dmitry Dmitriev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: