# HG changeset patch # User coleenp # Date 1464361031 0 # Node ID 66e7dd14b81562b0aedf7801d45c2ca912c3b833 # Parent 133bf85c3f3631b6782e6f599b8b2bc4c31ad422# Parent 835ea8e8b295c7d69337762ee6fc0bc0ae5abc27 Merge diff -r 133bf85c3f36 -r 66e7dd14b815 hotspot/src/share/vm/classfile/systemDictionary.cpp --- a/hotspot/src/share/vm/classfile/systemDictionary.cpp Fri May 27 10:52:39 2016 -0400 +++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp Fri May 27 14:57:11 2016 +0000 @@ -1336,9 +1336,12 @@ return nh; } - // Found the class, now load the superclass and interfaces. If they - // are shared, add them to the main system dictionary and reset - // their hierarchy references (supers, subs, and interfaces). + // Resolve the superclass and interfaces. They must be the same + // as in dump time, because the layout of depends on + // the specific layout of ik->super() and ik->local_interfaces(). + // + // If unexpected superclass or interfaces are found, we cannot + // load from the shared archive. if (ik->super() != NULL) { Symbol* cn = ik->super()->name(); @@ -1348,6 +1351,8 @@ // The dynamically resolved super class is not the same as the one we used during dump time, // so we cannot use ik. return nh; + } else { + assert(s->is_shared(), "must be"); } } @@ -1366,6 +1371,8 @@ // The dynamically resolved interface class is not the same as the one we used during dump time, // so we cannot use ik. return nh; + } else { + assert(i->is_shared(), "must be"); } }