8303422: Use common functions to exit the VM for -Xshare:dump and CDS errors

Reviewed-by: iklam, coleenp, fparain
This commit is contained in:
Matias Saavedra Silva 2023-04-17 21:38:46 +00:00
parent bb1a7bb3e1
commit e3ece365ce
9 changed files with 82 additions and 66 deletions

View file

@ -797,7 +797,7 @@ void StringTable::allocate_shared_strings_array(TRAPS) {
// refer to more than 16384 * 16384 = 26M interned strings! Not a practical concern
// but bail out for safety.
log_error(cds)("Too many strings to be archived: " SIZE_FORMAT, _items_count);
os::_exit(1);
MetaspaceShared::unrecoverable_writing_error();
}
objArrayOop primary = oopFactory::new_objArray(vmClasses::Object_klass(), primary_array_length, CHECK);