Integrated: 8350982: -server|-client causes fatal exception on static JDK

Jiangli Zhou jiangli at openjdk.org
Wed Mar 12 17:23:11 UTC 2025


On Tue, 4 Mar 2025 01:43:29 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

> Please review the `Arguments::parse_each_vm_init_arg` change to ignore`-server|-client` options, which avoids unrecognized option error on static JDK. 
> 
> On regular JDK, '-server|-client' options are processed/removed from command-line arguments by `CheckJvmType` during `CreateExecutionEnvironment`. That happens before `Arguments::parse_each_vm_init_arg` is called. With jvm.cfg setting, only server vm is known and client is ignored. So specifying '-server' and '-client' in command-line is really a no-op. 
> 
> On static JDK, the VM is statically linked with the launcher, and `CreateExecutionEnvironment` & `CheckJvmType` are not called. As the result, `Arguments::parse_each_vm_init_arg` could see `-server|-client` when running on static JDK, if the options are specified in the command line.

This pull request has now been integrated.

Changeset: 02c850fc
Author:    Jiangli Zhou <jiangli at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/02c850fca87372173eadba18dfa0231df33bebb0
Stats:     19 lines in 14 files changed: 2 ins; 5 del; 12 mod

8350982: -server|-client causes fatal exception on static JDK

Reviewed-by: iklam, alanb

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

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


More information about the hotspot-compiler-dev mailing list