8014059: JSR292: Failed to reject invalid class cplmhl00201m28n
authorbharadwaj
Tue, 21 May 2013 16:17:51 -0700
changeset 17823 0eeb35991a2e
parent 17612 1b6801b0796c
child 17825 b6fc2755ec91
8014059: JSR292: Failed to reject invalid class cplmhl00201m28n Summary: Restrict reference of interface methods by invokestatic and invokespecial to classfile version 52 or later. Reviewed-by: kvn, hseigel
hotspot/src/share/vm/classfile/classFileParser.cpp
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Mon May 20 23:41:27 2013 +0400
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Tue May 21 16:17:51 2013 -0700
@@ -444,8 +444,8 @@
             break;
           case JVM_REF_invokeStatic:
           case JVM_REF_invokeSpecial:
-            check_property(
-               tag.is_method() || tag.is_interface_method(),
+            check_property(tag.is_method() ||
+                           ((_major_version >= JAVA_8_VERSION) && tag.is_interface_method()),
                "Invalid constant pool index %u in class file %s (not a method)",
                ref_index, CHECK_(nullHandle));
              break;