RFR: 8230401: ClassLoaderData::_keep_alive is read with wrong type in c2i entry barrier
Erik Österlund
erik.osterlund at oracle.com
Tue Sep 3 11:34:48 UTC 2019
Hi Zhengyu,
Thanks for the review!
/Erik
On 2019-09-03 13:09, Zhengyu Gu wrote:
> Hi Erik,
>
> Looks good.
>
> Thanks for fixing it.
>
> -Zhengyu
>
> On 8/30/19 11:43 AM, Erik Österlund wrote:
>> Hi,
>>
>> Zhengyu noticed that the ClassLoaderData::_keep_alive field is a
>> short, but the c2i entry barrier reads it with cmpl, treating it like
>> an int.
>>
>> First of all, thanks Zhengyu for spotting that. Nice catch.
>>
>> Encoding cmpw is not currently supported for x86_64 extended
>> registers, used in the barriers. So my proposed fix is to simply
>> change the type of _keep_alive to int. Because the 2 extra bytes will
>> become padding anyway, so we are not really saving any bytes by
>> making it s2.
>>
>> Bug:
>> https://bugs.openjdk.java.net/browse/JDK-8230401
>>
>> Webrev:
>> http://cr.openjdk.java.net/~eosterlund/8230401/webrev.00/
>>
>> Thanks,
>> /Erik
More information about the hotspot-runtime-dev
mailing list