< prev index next >

src/hotspot/share/memory/filemap.cpp

Print this page

        

*** 333,357 **** assert(i == num_entries, "number of shared path entry mismatch"); } void FileMapInfo::check_nonempty_dir_in_shared_path_table() { assert(DumpSharedSpaces, "dump time only"); int end = _shared_path_table_size; if (!ClassLoaderExt::has_platform_or_app_classes()) { // 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); ! ClassLoader::exit_with_path_failure("Cannot have non-empty directory in paths", NULL); } } } } bool FileMapInfo::validate_shared_path_table() { assert(UseSharedSpaces, "runtime only"); --- 333,365 ---- assert(i == num_entries, "number of shared path entry mismatch"); } void FileMapInfo::check_nonempty_dir_in_shared_path_table() { assert(DumpSharedSpaces, "dump time only"); + + bool has_nonempty_dir = false; + int end = _shared_path_table_size; if (!ClassLoaderExt::has_platform_or_app_classes()) { // 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; } } } + + if (has_nonempty_dir) { + ClassLoader::exit_with_path_failure("Cannot have non-empty directory in paths", NULL); + } } bool FileMapInfo::validate_shared_path_table() { assert(UseSharedSpaces, "runtime only");
< prev index next >