8016764: JVM does not prohibit invokespecial in c.f.v 51.0 that invokes default interface method in c.f.v 52.0
authorhseigel
Thu, 29 Aug 2013 10:33:13 -0400
changeset 19692 43c74e9cf560
parent 19691 5116fb76692a
child 19693 633580a41062
child 19694 84bcddefd0d7
8016764: JVM does not prohibit invokespecial in c.f.v 51.0 that invokes default interface method in c.f.v 52.0 Summary: Check cfv before allowing invokespecial call to default method. Reviewed-by: kamg, acorn, dholmes
hotspot/src/share/vm/classfile/verifier.cpp
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Thu Aug 29 11:05:55 2013 +0200
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Thu Aug 29 10:33:13 2013 -0400
@@ -2318,9 +2318,6 @@
       types = 1 << JVM_CONSTANT_InvokeDynamic;
       break;
     case Bytecodes::_invokespecial:
-      types = (1 << JVM_CONSTANT_InterfaceMethodref) |
-              (1 << JVM_CONSTANT_Methodref);
-      break;
     case Bytecodes::_invokestatic:
       types = (_klass->major_version() < STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION) ?
         (1 << JVM_CONSTANT_Methodref) :