-
CSR
-
Resolution: Approved
-
P4
-
behavioral
-
low
-
Wrong CompileCommands will exit the VM instead of being ignored.
-
add/remove/modify command line option
-
JDK
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.
- csr of
-
JDK-8282797 `CompileCommand` Parsing Errors Should Exit VM
- Resolved