Top


定義場所(file name)

hotspot/src/share/vm/classfile/verifier.cpp

名前(function name)

bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class) {

本体部(body)

  {- -------------------------------------------
  (1) (変数宣言など)
      ---------------------------------------- -}

      Symbol* name = klass->name();
      klassOop refl_magic_klass = SystemDictionary::reflect_MagicAccessorImpl_klass();

  {- -------------------------------------------
  (1) 
      ---------------------------------------- -}

      return (should_verify_for(klass->class_loader(), should_verify_class) &&
        // return if the class is a bootstrapping class
        // or defineClass specified not to verify by default (flags override passed arg)
        // We need to skip the following four for bootstraping
        name != vmSymbols::java_lang_Object() &&
        name != vmSymbols::java_lang_Class() &&
        name != vmSymbols::java_lang_String() &&
        name != vmSymbols::java_lang_Throwable() &&

        // Can not verify the bytecodes for shared classes because they have
        // already been rewritten to contain constant pool cache indices,
        // which the verifier can't understand.
        // Shared classes shouldn't have stackmaps either.
        !klass()->is_shared() &&

        // As of the fix for 4486457 we disable verification for all of the
        // dynamically-generated bytecodes associated with the 1.4
        // reflection implementation, not just those associated with
        // sun/reflect/SerializationConstructorAccessor.
        // NOTE: this is called too early in the bootstrapping process to be
        // guarded by Universe::is_gte_jdk14x_version()/UseNewReflection.
        (refl_magic_klass == NULL ||
         !klass->is_subtype_of(refl_magic_klass) ||
         VerifyReflectionBytecodes)
      );
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.