RFR: 8347707: Standardise the use of os::snprintf and os::snprintf_checked [v2]
David Holmes
dholmes at openjdk.org
Mon Aug 25 07:09:02 UTC 2025
On Thu, 21 Aug 2025 07:46:18 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Yes but again if that happens during testing we need to know and fix the buffer size to get the non-truncated values.
>
> In this case the buffer size comes from shared code. Whatever size we choose for the static buffer, we can trigger the assert by setting LIBPATH and LD_LIBRARY_PATH to very long strings. This is just the error message, so it might be OK to truncate it. Otherwise we could need to allocate the buffer using malloc.
I'm inclined to keep the assert and address any future problems if they arise. Thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26849#discussion_r2297294080
More information about the hotspot-dev
mailing list