RFR: 8256828: ostream::print_cr() truncates buffer in copy-through case [v4]
David Holmes
dholmes at openjdk.org
Thu Jun 6 00:19:01 UTC 2024
On Wed, 5 Jun 2024 16:19:02 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> 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.
Thanks for the review @matias9927 !
> test/hotspot/gtest/utilities/test_ostream.cpp line 161:
>
>> 159: size_t initial_len = strlen(str);
>> 160: ASSERT_TRUE(initial_len < max_len);
>> 161: result = test(&buffer[0], buflen, false, result_len, str);
>
> I must have forgotten to add this comment before but here it is again:
> Is there a reason you chose to use `&buffer[0]` rather than simple `buffer`?
At some point when writing the test code it wouldn't compile (perhaps I had a misplaced const at the time?) but now it does - fixed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19512#issuecomment-2151154775
PR Review Comment: https://git.openjdk.org/jdk/pull/19512#discussion_r1628579597
More information about the hotspot-dev
mailing list