RFR: 8292989: Avoid dynamic memory in AsyncLogWriter [v4]
Xin Liu
xliu at openjdk.org
Sat Sep 10 00:59:32 UTC 2022
On Thu, 8 Sep 2022 11:24:58 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix MSVC warning C4267
>>
>> MSVC reports logAsyncWriter.cpp(62): warning C4267: 'initializing': conversion from
>> 'size_t' to 'int', possible loss of data
>
> src/hotspot/share/logging/logAsyncWriter.cpp line 89:
>
>> 87: // To save space and streamline execution, we just ignore null message.
>> 88: // client should use "" instead.
>> 89: if (msg == nullptr) return;
>
> Is that even valid? Who logs with a NULL message? If that is valid, why treat it differently than "", and if not, why not just assert here?
make sense. assert is better.
-------------
PR: https://git.openjdk.org/jdk/pull/10092
More information about the hotspot-runtime-dev
mailing list