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

Doug Simon dnsimon at openjdk.java.net
Tue Oct 12 08:28:08 UTC 2021


On Tue, 12 Oct 2021 08:08:25 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> src/hotspot/share/utilities/vmError.cpp line 920:
>> 
>>> 918:        // Even though ErrorLogPrintCodeLimit is ranged checked
>>> 919:        // during argument parsing, there's no way to prevent it
>>> 920:        // being set to a value outside the range.
>> 
>> I don't understand what you mean here. Do we not abort the VM if the flag value is out-of-range?
>
> `ErrorLogPrintCodeLimit` is a writable global variable so this is just being extra defensive should anything update `ErrorLogPrintCodeLimit` (e.g. `ErrorLogPrintCodeLimit == 100;`) after argument parsing.

I clarified the comment: 29060fc92429d9c33b5f90d5e9caba08a54b0e4e

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

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


More information about the hotspot-dev mailing list