8026065: InterfaceMethodref for invokespecial must name a direct superinterface

Add verification to check that invokespecial of an InterfaceMethodref names a method in a direct superinterface of the current class or interface in accordance with JSR 335, JVMS 4.9.2 Structural Constraints.

Reviewed-by: acorn, hseigel, coleenp
This commit is contained in:
Lois Foltan 2013-11-26 09:52:22 -05:00 committed by Harold Seigel
parent b1e3461fe5
commit 28557bc30e
5 changed files with 71 additions and 3 deletions

View file

@ -345,6 +345,9 @@ class ClassVerifier : public StackObj {
// that a class has been verified and prepared for execution.
bool was_recursively_verified() { return _klass->is_rewritten(); }
bool is_same_or_direct_interface(instanceKlassHandle klass,
VerificationType klass_type, VerificationType ref_class_type);
public:
enum {
BYTECODE_OFFSET = 1,