RFR: 8328880: Events::log_exception should limit the size of the logging message

Vladimir Kozlov kvn at openjdk.org
Fri Aug 23 02:38:13 UTC 2024


On Fri, 23 Aug 2024 02:24:32 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Someone can pass `message_length_limit` which is > strlen(message). What happens in this case?
>
> Printing stops at the end of `message`. Given this:
> 
> const char* msg = "This is the message";
> printf(">>%.*s<<\n", 40, msg);
> 
> we get:
> 
>>>This is the message<<
> 
> Having a limit >> strlen(message) is the normal expected case.

Good.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20638#discussion_r1728166895


More information about the hotspot-dev mailing list