On Wed, 1 Apr 2026 04:50:11 GMT, David Holmes <[email protected]> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve truncation code on BSD and Windows, add comment to Linux > > src/hotspot/os/windows/os_windows.cpp line 1069: > >> 1067: // Windows APIs require NUL-terminated strings; the name pointer >> 1068: // may not be NUL-terminated, so copy into a stringStream. >> 1069: stringStream ss; > > Suggestion: > > stringStream ss(len); > > We can avoid the need to grow on the write call. (Not sure if we need a +1 ?) Even better, just wrap it around a static buffer. Then, no allocation needed. char stack_buf[256]; stringStream ss(buf, sizeof(buf)); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30374#discussion_r3020637140
