src/share/vm/memory/metaspaceShared.cpp

Print this page
rev 6951 : 8066670: PrintSharedArchiveAndExit does not exit the VM when the archive is invalid
Summary: in FileMapInfo::fail_continue do not set UseSharedSpaces = false
Reviewed-by: dholmes, ccheung

*** 965,975 **** // Release the entire mapped region shared_rs.release(); #endif // If -Xshare:on is specified, print out the error message and exit VM, // otherwise, set UseSharedSpaces to false and continue. ! if (RequireSharedSpaces) { vm_exit_during_initialization("Unable to use shared archive.", "Failed map_region for using -Xshare:on."); } else { FLAG_SET_DEFAULT(UseSharedSpaces, false); } return false; --- 965,975 ---- // Release the entire mapped region shared_rs.release(); #endif // If -Xshare:on is specified, print out the error message and exit VM, // otherwise, set UseSharedSpaces to false and continue. ! if (RequireSharedSpaces || PrintSharedArchiveAndExit) { vm_exit_during_initialization("Unable to use shared archive.", "Failed map_region for using -Xshare:on."); } else { FLAG_SET_DEFAULT(UseSharedSpaces, false); } return false;