RFR: 8360177: ParallelArguments::initialize has incorrect format string

Kim Barrett kbarrett at openjdk.org
Mon Jun 23 15:29:29 UTC 2025


On Mon, 23 Jun 2025 07:07:34 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Please review this trivial fix to a jio_fprintf format string. It should be using
>> "%zu" to print values of type uintx, rather than using "%d".
>> 
>> Testing: mach5 tier1
>> Locally tested with gcc printf warnings enabled for jio_fprintf, and verified
>> the warnings for the changed call are no longer present.
>
> src/hotspot/share/gc/parallel/parallelArguments.cpp line 73:
> 
>> 71:       if (FLAG_IS_CMDLINE(MinSurvivorRatio)) {
>> 72:         jio_fprintf(defaultStream::error_stream(),
>> 73:           "Inconsistent MinSurvivorRatio vs InitialSurvivorRatio: %zu vs %zu\n", MinSurvivorRatio, InitialSurvivorRatio);
> 
> Should probably use `UINTX_FORMAT` instead.

Nope: https://bugs.openjdk.org/browse/JDK-8346990 Remove INTX_FORMAT and UINTX_FORMAT macros

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25926#discussion_r2161899640


More information about the hotspot-gc-dev mailing list