RFR: 8256828: ostream::print_cr() truncates buffer in copy-through case
David Holmes
dholmes at openjdk.org
Mon Jun 3 07:25:02 UTC 2024
On Sun, 2 Jun 2024 22:05:40 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
Thanks for looking at this Thomas!
> So, just to clarify, this is a behavioral change, right?
>
> Where before we would not truncate raw strings, now we do, since result_len is used to determine how many bytes we will write to the output sink.
No, the only change in behaviour is issuing the warning in all cases of truncation. The `result_len` handling is the same as before.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19512#issuecomment-2144459529
More information about the hotspot-dev
mailing list