RFR: 8352184: Jtreg tests using CommandLineOptionTest.getVMTypeOption() and optionsvalidation.JVMOptionsUtils fail on static JDK [v2]

Jiangli Zhou jiangli at openjdk.org
Tue Mar 25 15:25:56 UTC 2025


On Tue, 25 Mar 2025 05:16:36 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Allocate memory for vm_info string using NEW_C_HEAP_ARRAY.
>
> src/hotspot/share/runtime/abstract_vm_version.cpp line 169:
> 
>> 167:   jio_snprintf(vm_info, len, "%s%s%s", mode,
>> 168:                is_vm_statically_linked() ? ", static" : "",
>> 169:                CDSConfig::is_using_archive() ? ", sharing" : "");
> 
> I would prefer to see these parts defined as `const char * static_str = ", static"` so we can use `strlen` above rather than having magic numbers.

Done. Thanks

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24171#discussion_r2012360877


More information about the core-libs-dev mailing list