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

David Holmes david.holmes at oracle.com
Tue Jul 21 01:49:01 UTC 2015


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