RFR: 8256828: ostream::print_cr() truncates buffer in copy-through case [v4]

Matias Saavedra Silva matsaave at openjdk.org
Wed Jun 5 16:22:00 UTC 2024


On Tue, 4 Jun 2024 07:34:34 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Clarifies the behaviour of this function in regards to truncation when adding a CR. Ensures a truncation warning is always issued.
>> 
>> Adds unit testing for the specialized cases.
>> 
>> See JBS for discussion of other suggestions.
>> 
>> Testing: - tiers 1-4
>> 
>> Thanks
>
> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Simplified the test code - thanks @tstuefe!
>   Rewrote the comment block describing do_vsnprintf.

Changes and test look good! I have two things I'm not sure about but otherwise, I approve.

src/hotspot/share/utilities/ostream.hpp line 45:

> 43: // This allows for redirection via -XX:+DisplayVMOutputToStdout and
> 44: // -XX:+DisplayVMOutputToStderr.
> 45: //

Extra lines added here

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

Marked as reviewed by matsaave (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19512#pullrequestreview-2099526414
PR Review Comment: https://git.openjdk.org/jdk/pull/19512#discussion_r1627981047


More information about the hotspot-dev mailing list