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

Exit VM for CompileCommand parsing errors

    XMLWordPrintable

Details

    • behavioral
    • low
    • Wrong CompileCommands will exit the VM instead of being ignored.
    • add/remove/modify command line option
    • JDK

    Description

      Summary

      CompileCommand prints an error for parsing errors. The VM should exit the VM after the error.

      Problem

      At the moment, errors during CompileCommand parsing just print an error but do not exit the VM. As a result, issues like JDK-8282715 go unnoticed.

      E.g. java -XX:CompileCommand=compileonly,HashMap:: -version prints an error message but continues afterwards with the command:

      CompileCommand: An error occurred during parsing
      Error: Could not parse method pattern
      Line: 'compileonly,HashMap::'
      
      Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true
      Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>'
      Use:   '-XX:CompileCommand=help' for more information and to list all option.

      Solution

      Exit the VM after the CompileCommand: An error occurred during parsing error message.

      Specification

      E.g. java -XX:CompileCommand=compileonly,HashMap:: -version will exit the VM after a parsing error occurred.

      CompileCommand: An error occurred during parsing
      Error: Could not parse method pattern
      Line: 'compileonly,HashMap::'
      
      Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true
      Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>'
      Use:   '-XX:CompileCommand=help' for more information and to list all option.
      
      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.

      Attachments

        Issue Links

          Activity

            People

              tholenstein Tobias Holenstein
              tholenstein Tobias Holenstein
              Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: