RFR: 8350982: -server|-client causes fatal exception on static JDK
David Holmes
dholmes at openjdk.org
Wed Mar 5 05:59:56 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.
I'm okay with updating the tests. I don't think any tests specifically targeting C2 should simply be using -server. Or -client for that matter.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23881#issuecomment-2699947384
More information about the hotspot-runtime-dev
mailing list