[9] RFR: 8152207: Perform array bound checks while getting a length of bytecode instructions

harold seigel harold.seigel at oracle.com
Thu May 26 17:36:03 UTC 2016


Hi Artem,

The hotspot changes look good.

For the jdk webrev, can you move the new code at lines 1699 and 1700 to 
just inside the 'default:' alternative?

Thanks, Harold


On 5/20/2016 4:05 PM, Artem Smotrakov wrote:
> Hello,
>
> Could someone review this fix, please?
>
> http://cr.openjdk.java.net/~asmotrak/8152207/hotspot/webrev.01/
> http://cr.openjdk.java.net/~asmotrak/8152207/jdk/webrev.00/
>
> Artem
>
> On 05/10/2016 01:49 PM, Artem Smotrakov wrote:
>> Hi Christian,
>>
>> Thank you for review. Here is updated webrev
>>
>> http://cr.openjdk.java.net/~asmotrak/8152207/hotspot/webrev.01/
>>
>> Artem
>>
>> On 05/09/2016 01:24 PM, Christian Thalinger wrote:
>>>
>>>> On May 4, 2016, at 1:48 PM, Artem Smotrakov 
>>>> <artem.smotrakov at oracle.com <mailto:artem.smotrakov at oracle.com>> 
>>>> wrote:
>>>>
>>>> Hello,
>>>>
>>>> Please review two small patches for jdk and hotspot repos which add 
>>>> array bound checks to functions which return a length of bytecode 
>>>> instruction.
>>>>
>>>> Please see details in https://bugs.openjdk.java.net/browse/JDK-8152207
>>>>
>>>> http://cr.openjdk.java.net/~asmotrak/8152207/jdk/webrev.00/ 
>>>> <http://cr.openjdk.java.net/%7Easmotrak/8152207/jdk/webrev.00/>
>>>> http://cr.openjdk.java.net/~asmotrak/8152207/hotspot/webrev.00/
>>>
>>> static bool        is_defined     (int  code)    { return 0 <= code 
>>> && code < number_of_codes && flags(code, false) != 0; }
>>> + static int length_for (Code code) { return 0 <= code && code < 
>>> number_of_codes ? _lengths[code] & 0xF : -1; }
>>> + static int wide_length_for(Code code) { return 0 <= code && code < 
>>> number_of_codes ? _lengths[code] >> 4 : -1; }
>>> You should factor the bound check into a separate method.
>>>
>>>>
>>>> Artem
>>>
>>
>



More information about the hotspot-runtime-dev mailing list