Mercurial > hg > graal-jvmci-8
diff src/share/vm/oops/instanceKlass.cpp @ 23905:cb4af293fe70 jdk8u101-b07
8153312: Constrain AppCDS behavior
Reviewed-by: iklam, acorn, mschoene
author | jiangli |
---|---|
date | Wed, 27 Apr 2016 14:41:55 -0400 |
parents | 50e62b688ddc |
children | f13e777eb255 |
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.cpp Mon May 02 14:24:36 2016 -0700 +++ b/src/share/vm/oops/instanceKlass.cpp Wed Apr 27 14:41:55 2016 -0400 @@ -726,7 +726,12 @@ // methods have been rewritten since rewrite may // fabricate new Method*s. // also does loader constraint checking - if (!this_oop()->is_shared()) { + // + // Initialize_vtable and initialize_itable need to be rerun for + // a shared class if the class is not loaded by the NULL classloader. + ClassLoaderData * loader_data = this_oop->class_loader_data(); + if (!(this_oop()->is_shared() && + loader_data->is_the_null_class_loader_data())) { ResourceMark rm(THREAD); this_oop->vtable()->initialize_vtable(true, CHECK_false); this_oop->itable()->initialize_itable(true, CHECK_false);