RFR: 8224980: FLAG_SET_ERGO silently ignores invalid values [v2]
Ioi Lam
iklam at openjdk.org
Tue Feb 14 05:15:15 UTC 2023
On Tue, 14 Feb 2023 04:28:49 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> @dholmes-ora comment - make sure errors are printed for FLAG_SET_ERGO
>
> src/hotspot/share/runtime/flags/jvmFlagAccess.cpp line 70:
>
>> 68: if (err != JVMFlag::SUCCESS) {
>> 69: if (origin == JVMFlagOrigin::ERGONOMIC) {
>> 70: fatal("FLAG_SET_ERGO cannot be used to set an invalid value for %s", flag->name());
>
> This would be okay if we are guaranteed to see the `printError` message from the constraint function, but I don't think we are. If I'm reading things correctly we need `verbose` to be true to get the error message, but `verbose` comes from `AtParse` which seems to be set to 0 and never modified. ??
> I think we need to force `verbose` to be true if `origin == JVMFlagOrigin::ERGONOMIC)`.
I've forced `verbose` to be true in another code path. I added the same logic here to be complete.
-------------
PR: https://git.openjdk.org/jdk/pull/12549
More information about the hotspot-dev
mailing list