mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
6911922: JVM must throw VerifyError for jsr or jsr_w opcodes in class file v.51+
6693236: A class file whose version number is greater than to 50.0 must be verified using the typechecker Disable failover verification for classfiles >= v51 Reviewed-by: never, acorn, dholmes
This commit is contained in:
parent
9b7dfe0cbc
commit
4f45d8c3a2
1 changed files with 4 additions and 1 deletions
|
@ -25,6 +25,8 @@
|
|||
# include "incls/_precompiled.incl"
|
||||
# include "incls/_verifier.cpp.incl"
|
||||
|
||||
#define NOFAILOVER_MAJOR_VERSION 51
|
||||
|
||||
// Access to external entry for VerifyClassCodes - old byte code verifier
|
||||
|
||||
extern "C" {
|
||||
|
@ -91,7 +93,8 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, bool shoul
|
|||
klass, message_buffer, message_buffer_len, THREAD);
|
||||
split_verifier.verify_class(THREAD);
|
||||
exception_name = split_verifier.result();
|
||||
if (FailOverToOldVerifier && !HAS_PENDING_EXCEPTION &&
|
||||
if (klass->major_version() < NOFAILOVER_MAJOR_VERSION &&
|
||||
FailOverToOldVerifier && !HAS_PENDING_EXCEPTION &&
|
||||
(exception_name == vmSymbols::java_lang_VerifyError() ||
|
||||
exception_name == vmSymbols::java_lang_ClassFormatError())) {
|
||||
if (TraceClassInitialization) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue