changeset 1761:e40a3601bc1f

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 Summary: Disable failover verification for classfiles >= v51 Reviewed-by: never, acorn, dholmes
author kamg
date Wed, 19 May 2010 10:19:10 -0400
parents 892898e961c5
children 3548f3198dca
files src/share/vm/classfile/verifier.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/verifier.cpp	Mon May 17 07:11:27 2010 -0700
+++ b/src/share/vm/classfile/verifier.cpp	Wed May 19 10:19:10 2010 -0400
@@ -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 @@
           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) {