RFR (XXS): 8017571: JSR292: JVM crashing on assert "cast to instanceKlass" while producing MethodHandle for array methods with MethodHandle.findVirtual
Christian Thalinger
christian.thalinger at oracle.com
Wed Jun 26 09:15:47 PDT 2013
On Jun 25, 2013, at 6:19 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
> How you got ObjArrayKlass here? Also bottom_klass() could be TypeArrayKlass.
You are right; it doesn't work. Reflection::verify_class_access can only handle instance classes. Here is a new webrev that checks for instance classes before doing the check:
http://cr.openjdk.java.net/~twisti/8017571/webrev/
I noticed that is_public is a Klass method so we can remove the InstanceKlass cast.
-- Chris
>
> Vladimir
>
> On 6/25/13 6:03 PM, Christian Thalinger wrote:
>> http://cr.openjdk.java.net/~twisti/8017571/webrev/
>>
>> 8017571: JSR292: JVM crashing on assert "cast to instanceKlass" while producing MethodHandle for array methods with MethodHandle.findVirtual
>> Reviewed-by:
>>
>> Verification code in MHN_resolve_Mem calls Reflection::verify_class_access with MemberName.clazz as new_class. If the class happens to be an array class we hit an assert.
>>
>> The fix is to check for array types and use the bottom type for these.
>>
>> src/share/vm/prims/methodHandles.cpp
>>
More information about the hotspot-compiler-dev
mailing list