RFR: 8274986: max code printed in hs-err logs should be configurable [v5]

Doug Simon dnsimon at openjdk.java.net
Tue Oct 12 11:57:57 UTC 2021


On Tue, 12 Oct 2021 11:42:47 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Doug Simon has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - clarify need for defensive code
>>  - grammar fix
>
> src/hotspot/share/utilities/vmError.cpp line 921:
> 
>> 919:        // during argument parsing, there's no way to prevent it
>> 920:        // subsequently (i.e., after parsing) being set to a
>> 921:        // value outside the range.
> 
> This is overly defensive IMO. Flags should never be touched after initialization is complete and we assume we can trust ourselves.

In general I agree but in error reporting code I get extra defensive plus the defensive code is small and not on a hot path.
That said, I won't object to it being undone in a subsequent PR.

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

PR: https://git.openjdk.java.net/jdk/pull/5875


More information about the hotspot-dev mailing list