src/share/vm/memory/universe.cpp

changeset 6134
9d15b81d5d1b
parent 6086
610be0309a79
child 6376
cfd4aac53239
child 6492
1174c8abbdb6
     1.1 --- a/src/share/vm/memory/universe.cpp	Fri Nov 22 13:42:46 2013 -0800
     1.2 +++ b/src/share/vm/memory/universe.cpp	Tue Nov 26 18:16:04 2013 -0500
     1.3 @@ -120,6 +120,7 @@
     1.4  oop Universe::_arithmetic_exception_instance          = NULL;
     1.5  oop Universe::_virtual_machine_error_instance         = NULL;
     1.6  oop Universe::_vm_exception                           = NULL;
     1.7 +Method* Universe::_throw_illegal_access_error         = NULL;
     1.8  Array<int>* Universe::_the_empty_int_array            = NULL;
     1.9  Array<u2>* Universe::_the_empty_short_array           = NULL;
    1.10  Array<Klass*>* Universe::_the_empty_klass_array     = NULL;
    1.11 @@ -1096,6 +1097,18 @@
    1.12    Universe::_finalizer_register_cache->init(
    1.13      SystemDictionary::Finalizer_klass(), m);
    1.14  
    1.15 +  InstanceKlass::cast(SystemDictionary::misc_Unsafe_klass())->link_class(CHECK_false);
    1.16 +  m = InstanceKlass::cast(SystemDictionary::misc_Unsafe_klass())->find_method(
    1.17 +                                  vmSymbols::throwIllegalAccessError_name(),
    1.18 +                                  vmSymbols::void_method_signature());
    1.19 +  if (m != NULL && !m->is_static()) {
    1.20 +    // Note null is okay; this method is used in itables, and if it is null,
    1.21 +    // then AbstractMethodError is thrown instead.
    1.22 +    tty->print_cr("Unable to link/verify Unsafe.throwIllegalAccessError method");
    1.23 +    return false; // initialization failed (cannot throw exception yet)
    1.24 +  }
    1.25 +  Universe::_throw_illegal_access_error = m;
    1.26 +
    1.27    // Setup method for registering loaded classes in class loader vector
    1.28    InstanceKlass::cast(SystemDictionary::ClassLoader_klass())->link_class(CHECK_false);
    1.29    m = InstanceKlass::cast(SystemDictionary::ClassLoader_klass())->find_method(vmSymbols::addClass_name(), vmSymbols::class_void_signature());

mercurial