mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8007736: VerifyError for static method in interface
Reviewed-by: dholmes, acorn
This commit is contained in:
parent
bf91374f3f
commit
ff4bbcd501
2 changed files with 52 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -61,7 +61,8 @@
|
|||
# include "bytes_ppc.hpp"
|
||||
#endif
|
||||
|
||||
#define NOFAILOVER_MAJOR_VERSION 51
|
||||
#define NOFAILOVER_MAJOR_VERSION 51
|
||||
#define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION 52
|
||||
|
||||
// Access to external entry for VerifyClassCodes - old byte code verifier
|
||||
|
||||
|
@ -2317,6 +2318,11 @@ void ClassVerifier::verify_invoke_instructions(
|
|||
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) :
|
||||
((1 << JVM_CONSTANT_InterfaceMethodref) | (1 << JVM_CONSTANT_Methodref));
|
||||
break;
|
||||
default:
|
||||
types = 1 << JVM_CONSTANT_Methodref;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue