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

Java 9 process negative MaxTenuringThreshold in different way than Java 8

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b64

      Backports

        Description

        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)

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: