RFR: 8311575: Fix invalid format parameters
Daniel Jeliński
djelinski at openjdk.org
Fri Jul 7 06:20:55 UTC 2023
On Fri, 7 Jul 2023 04:05:05 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Please review this change that fixes a few issues with printf-like function parameters.
>>
>> No new tests. I'll run tier1 & tier2 before integrating, just to make sure.
>
> src/hotspot/share/runtime/arguments.cpp line 3951:
>
>> 3949: if (lvl == NMT_unknown) {
>> 3950: jio_fprintf(defaultStream::error_stream(),
>> 3951: "Syntax error, expecting -XX:NativeMemoryTracking=[off|summary|detail]");
>
> I think it also needs a trailing `\n`
Good point. I triggered this error and it didn't look pretty:
> java.exe -XX:NativeMemoryTracking=blah
Syntax error, expecting -XX:NativeMemoryTracking=[off|summary|detail]Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I noticed a few other spots in this file where trailing `\n` is missing. I'll fix them here as well.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14783#discussion_r1255296233
More information about the hotspot-dev
mailing list