RFR(S): 8201649: Remove dubious call_jio_print in ostream.cpp
David Holmes
david.holmes at oracle.com
Tue Apr 17 21:17:08 UTC 2018
On 18/04/2018 1:48 AM, Thomas Stüfe wrote:
> Hi Christoph,
>
> I do not understand jio_print() at all. I think it is just wrong: if a
> vfprintf hook is set, it prints to the defaultStream::output_stream(),
> otherwise to defaultStream::output_fd()? Isnt that the same? Compare
> this to jio_vfprintf(), which does the same logic, but correctly
> prints to the vfprintf hook if it is set.
If there is a hook it does a formatted print: jio_print -> jio_fprintf
-> jio_vfprintf -> Arguments::vfprintf_hook()
else it does a raw write.
Now why it does this is another matter. I have no idea. But I wouldn't
suggest changing it just because I don't know why it's done the way it is.
David
> I would propose to get rid of jio_print() altogether and replace the
> few callers of it (all in ostream.cpp) with this:
>
> jio_printf("%s", string);
>
> which does the same, but correctly.
>
> Best Regards, Thomas
>
> On Tue, Apr 17, 2018 at 4:48 PM, Langer, Christoph
> <christoph.langer at sap.com> wrote:
>> Hi,
>>
>> can you please review a fix proposal for defaultStream::write(const char* s, size_t len).
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8201649
>> Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8201649.0/
>>
>> I have seen occurrences of truncated buffers which don't need to happen.
>>
>> Thanks and best regards
>> Christoph
>>
More information about the hotspot-dev
mailing list