Integrated: JDK-8282797: CompileCommand parsing errors should exit VM

Tobias Holenstein tholenstein at openjdk.org
Fri Jun 9 13:03:53 UTC 2023


On Tue, 2 May 2023 11:35:54 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:

> Currently, errors during compile command parsing just print an error but don't exit the VM. As a result, issues go unnoticed. 
> 
> With this PR the behavior is changed to exit the VM when an error occurs.
> 
> E.g. `java -XX:CompileCommand=compileonly,HashMap:: -version` will exit the VM after a parsing 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.
> 
> 
> ### Updated Tests
> Updated all tests to now expect an error code `1` for wrong `CompileCommand`

This pull request has now been integrated.

Changeset: c0527561
Author:    Tobias Holenstein <tholenstein at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/c052756154603a9d3a13200fa407a2dc124437f3
Stats:     167 lines in 24 files changed: 48 ins; 8 del; 111 mod

8282797: CompileCommand parsing errors should exit VM

Reviewed-by: kvn, chagedorn, thartmann

-------------

PR: https://git.openjdk.org/jdk/pull/13753


More information about the hotspot-dev mailing list