# HG changeset patch # User hseigel # Date 1386347590 18000 # Node ID 71cff6a30ec12ab32a3d4e3cf5d0e88765220c38 # Parent 163b4d58a6f260697e02232eaa0781265ceea09f 8029415: java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java fails on all platforms with hs25-b61 Summary: Check first that a class is not a dynamically-generated bytecode associated with 1.4 reflection implementation, to emitting an ICCE of an invokespecial IMR of a method in an indirect superinterface. Reviewed-by: acorn, hseigel Contributed-by: lois.foltan@oracle.com diff -r 163b4d58a6f2 -r 71cff6a30ec1 hotspot/src/share/vm/interpreter/linkResolver.cpp --- a/hotspot/src/share/vm/interpreter/linkResolver.cpp Thu Dec 05 12:35:38 2013 +0100 +++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp Fri Dec 06 11:33:10 2013 -0500 @@ -943,8 +943,17 @@ Klass *klass_to_check = !InstanceKlass::cast(current_klass())->is_anonymous() ? current_klass() : InstanceKlass::cast(current_klass())->host_klass(); + // As of the fix for 4486457 we disable verification for all of the + // dynamically-generated bytecodes associated with the 1.4 + // reflection implementation, not just those associated with + // sun/reflect/SerializationConstructorAccessor. + bool is_reflect = JDK_Version::is_gte_jdk14x_version() && + UseNewReflection && + klass_to_check->is_subclass_of( + SystemDictionary::reflect_MagicAccessorImpl_klass()); - if (!InstanceKlass::cast(klass_to_check)->is_same_or_direct_interface(resolved_klass())) { + if (!is_reflect && + !InstanceKlass::cast(klass_to_check)->is_same_or_direct_interface(resolved_klass())) { ResourceMark rm(THREAD); char buf[200]; jio_snprintf(buf, sizeof(buf),