RFR: 8365896: Remove unnecessary explicit buffer nul-termination after using os::snprintf [v2]

duke duke at openjdk.org
Wed Oct 29 12:57:23 UTC 2025


On Tue, 28 Oct 2025 17:31:47 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.
>
> Paul Hübner has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8365896
>  - Remove unneccessary null terminator reservations.
>  - Remove redundant null termination.

@Arraying 
Your change (at version 57a7add0cd7705b81d8fb140b4cdd9dbad1c7530) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/27920#issuecomment-3461378321


More information about the hotspot-dev mailing list