RFR: 8350982: -server|-client causes fatal exception on static JDK [v3]
Ioi Lam
iklam at openjdk.org
Wed Mar 12 16:26:05 UTC 2025
On Tue, 11 Mar 2025 15:28:25 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.
>
> Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove @bug and update @summary.
CDS test changes look good to me.
-------------
Marked as reviewed by iklam (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23881#pullrequestreview-2679130059
More information about the hotspot-compiler-dev
mailing list