src/hotspot/share/memory/heapShared.cpp
changeset 52319 625f6c742392
parent 52062 8dbf1a13af49
child 52402 72d4e10305b9
--- a/src/hotspot/share/memory/heapShared.cpp	Mon Oct 29 12:33:41 2018 -0700
+++ b/src/hotspot/share/memory/heapShared.cpp	Wed Oct 17 15:57:10 2018 -0700
@@ -417,6 +417,11 @@
         Klass* resolved_k = SystemDictionary::resolve_or_null(
                                               (obj_k)->name(), THREAD);
         if (resolved_k != obj_k) {
+          assert(!SystemDictionary::is_well_known_klass(resolved_k),
+                 "shared well-known classes must not be replaced by JVMTI ClassFileLoadHook");
+          ResourceMark rm(THREAD);
+          log_info(cds, heap)("Failed to load subgraph because %s was not loaded from archive",
+                              resolved_k->external_name());
           return;
         }
         if ((obj_k)->is_instance_klass()) {