src/hotspot/share/memory/filemap.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/hotspot/share/memory/filemap.cpp Thu May 3 15:06:34 2018
--- new/src/hotspot/share/memory/filemap.cpp Thu May 3 15:06:34 2018
*** 331,340 ****
--- 331,354 ----
i++;
}
assert(i == num_entries, "number of shared path entry mismatch");
}
+ static bool check_nonempty_dir(SharedClassPathEntry* e) {
+ if (!e->is_dir()) {
+ return false;
+ }
+
+ const char* path = e->name();
+ if (!os::dir_is_empty(path)) {
+ tty->print_cr("Error: non-empty directory '%s'", path);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
void FileMapInfo::check_nonempty_dir_in_shared_path_table() {
assert(DumpSharedSpaces, "dump time only");
bool has_nonempty_dir = false;
*** 343,359 ****
--- 357,375 ----
// only check the boot path if no app class is loaded
end = ClassLoaderExt::app_class_paths_start_index();
}
for (int i = 0; i < end; i++) {
! SharedClassPathEntry *e = shared_path(i);
if (e->is_dir()) {
const char* path = e->name();
if (!os::dir_is_empty(path)) {
tty->print_cr("Error: non-empty directory '%s'", path);
has_nonempty_dir = true;
! SharedClassPathEntry* e = shared_path(i);
+ has_nonempty_dir = check_nonempty_dir(e);
}
+
+ // may need to check module path entries.
+ if ((end == ClassLoaderExt::app_class_paths_start_index()) && (ClassLoader::num_module_path_entries() > 0)) {
+ for (int i = ClassLoaderExt::app_module_paths_start_index(); i < _shared_path_table_size; i++) {
+ SharedClassPathEntry* e = shared_path(i);
+ has_nonempty_dir = check_nonempty_dir(e);
}
}
if (has_nonempty_dir) {
ClassLoader::exit_with_path_failure("Cannot have non-empty directory in paths", NULL);
src/hotspot/share/memory/filemap.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File