RFR: 8365896: Remove unnecessary explicit buffer nul-termination after using os::snprintf
David Holmes
dholmes at openjdk.org
Wed Oct 22 02:55:01 UTC 2025
On Tue, 21 Oct 2025 16:05:31 GMT, Paul Hübner <phubner at openjdk.org> wrote:
> Hi all,
>
> This PR removes some leftover null terminators and buffer reservations for null terminators, which have been made redundant with the new `snprintf` family of functions.
>
> In order to find these occurrences, I methodologically used multiple regular expressions over the entire codebase. I took a look at around 130 files in total, and updated where appropriate.
>
> I’ve tested this through tiers 1-5 on Linux (x64, AArch64), macOS (x64, AArch64) and Windows (x64). I’ve also successfully compiled for PowerPC and Zero on Linux.
They all seem fine to me. Thanks for doing this cleanup.
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27920#pullrequestreview-3363518323
More information about the serviceability-dev
mailing list