RFR(XS) 8129895: New verifier fails to reject erroneous cast from int[] to other arrays of small integer types

harold seigel harold.seigel at oracle.com
Wed Jul 22 12:01:54 UTC 2015


Thanks David!

Harold

On 7/21/2015 9:31 PM, David Holmes wrote:
> Hi Harold,
>
> Thanks for clarifying. Good to go.
>
> David
>
> On 21/07/2015 11:49 PM, harold seigel wrote:
>> Hi David,
>>
>> Thanks for the review.
>>
>> The new function is named is_component_assignable_from() because it is
>> similar to existing function is_assignable_from().  Also, the purpose of
>> the function is to check assignability of array components.  It just so
>> happens that assignability for the integer primitives is determined by
>> identity, but that is not so for other array components that it checks.
>>
>>  >> I'm also wondering what the situation is with long[], float[] and
>> double[]?
>> The verifier correctly throws VerifyError when checking assignability
>> between arrays of different primitive types in cases of longs, floats,
>> and doubles.
>>
>> Thanks, Harold
>>
>> The new function checks for assignability of array components. For int
>> On 7/20/2015 9:49 PM, David Holmes wrote:
>>> Hi Harold,
>>>
>>> On 21/07/2015 4:29 AM, harold seigel wrote:
>>>> Hi,
>>>>
>>>> Please review this small change to fix bug 8129895.  The split 
>>>> verifier
>>>> erroneously allows arrays of primitive ints to be assignable to arrays
>>>> of Booleans, bytes, chars, and shorts.  This fix adds a new function
>>>> (is_component_assignable_from()) for explicitly checking 
>>>> assign-ability
>>>> of array components.  The new function requires that primitive array
>>>> components be identical for assign-ability.
>>>>
>>>> Open webrev: http://cr.openjdk.java.net/~hseigel/bug_8129895/
>>>
>>> My only nit here is that "is_assignable" doesn't reflect the actual
>>> check - it's is-equal for the primitives not is-assignable.
>>>
>>> I'm also wondering what the situation is with long[], float[] and
>>> double[]?
>>>
>>> Thanks,
>>> David
>>>
>>>> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8129895
>>>>
>>>> The fix was tested with JCK Lang and VM tests, the UTE quick and split
>>>> verifier tests, and the hotspot, and JDK vm, java/io, java/lang, and
>>>> java/util JTreg tests.
>>>>
>>>> Thanks, Harold
>>



More information about the hotspot-runtime-dev mailing list