changeset 50917:18fba780c1d1

8203031: segfaults from jvmti_AddToBootstrapClassLoaderSearch Reviewed-by: sspitsyn, iklam, jiangli
author amenkov
date Thu, 31 May 2018 10:14:41 -0700
parents 6e9805157cf6
children 2cbc42a5764b
files src/hotspot/share/classfile/classLoaderExt.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/classfile/classLoaderExt.cpp	Fri May 25 22:56:00 2018 -0700
+++ b/src/hotspot/share/classfile/classLoaderExt.cpp	Thu May 31 10:14:41 2018 -0700
@@ -55,8 +55,10 @@
 
 void ClassLoaderExt::append_boot_classpath(ClassPathEntry* new_entry) {
 #if INCLUDE_CDS
-  warning("Sharing is only supported for boot loader classes because bootstrap classpath has been appended");
-  FileMapInfo::current_info()->header()->set_has_platform_or_app_classes(false);
+  if (UseSharedSpaces) {
+    warning("Sharing is only supported for boot loader classes because bootstrap classpath has been appended");
+    FileMapInfo::current_info()->header()->set_has_platform_or_app_classes(false);
+  }
 #endif
   ClassLoader::add_to_boot_append_entries(new_entry);
 }