Integrated: 8365896: Remove unnecessary explicit buffer nul-termination after using os::snprintf

Paul Hübner phubner at openjdk.org
Wed Oct 29 13:03:12 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.

This pull request has now been integrated.

Changeset: 0f34b020
Author:    Paul Hübner <phubner at openjdk.org>
Committer: Coleen Phillimore <coleenp at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/0f34b0203ad8e8e9d4a4dcdd9af2bafa60311fec
Stats:     23 lines in 10 files changed: 1 ins; 9 del; 13 mod

8365896: Remove unnecessary explicit buffer nul-termination after using os::snprintf

Reviewed-by: dholmes, coleenp

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

PR: https://git.openjdk.org/jdk/pull/27920


More information about the hotspot-dev mailing list