[8u] RFR 8248924: JDK-8056964 8u backport is not accurate
Zhengyu Gu
zgu at redhat.com
Wed Jul 8 17:48:15 UTC 2020
On 7/8/20 11:37 AM, Andrew Hughes wrote:
>
>
> On 07/07/2020 19:56, Zhengyu Gu wrote:
>> Please review this small patch that fixes inaccurate backport of
>> JDK-8056964.
>>
>> Webrev: http://cr.openjdk.java.net/~zgu/JDK-8248924/webrev.00/
>>
>> Test:
>> tier1 on Linux 86_64
>>
>> Thanks,
>>
>> -Zhengyu
>>
>
> In what way is it not accurate?
JDK-8056964 original patch uses os::strdup_check_oom() to copy value,
but the backport converted to strdup().
There are a couple of differences between the two calls.
1) os::strdup_check_oom() memory is tracked by NMT
2) when fail to allocate memory, os::strdup_check_oom() results OOM and
exit VM, while strdup() returns NULL.
Thanks,
-Zhengyu
>
> Thanks,
>
More information about the jdk8u-dev
mailing list