[jdk8u-dev] RFR: 8362208: [8u] Buffer overflow in g1GCPhaseTimes.cpp::LineBuffer::_buffer [v2]
SendaoYan
syan at openjdk.org
Thu Jul 17 06:36:36 UTC 2025
On Wed, 16 Jul 2025 14:30:41 GMT, Paul Hohensee <phh at openjdk.org> wrote:
> Afaik a guarantee is supposed to check for JVM-ending situations, so it seems to strong to me just for losing some logging info. Even an assert is imo too strong. I'd turn the guarantee into a debug-only warning with something like "previous LineBuffer overflow, request ignored" and have it execute just once. I'd also gate the whole method on (_cur < BUFFER_LEN) so vnsprintf isn't called unnecessarily.
@phohensee Thanks for your suggestions. The guaratee has been removed, and I add a debug only warning, and then return early when `_cur < BUFFER_LEN`
-------------
PR Comment: https://git.openjdk.org/jdk8u-dev/pull/668#issuecomment-3082752977
More information about the jdk8u-dev
mailing list