8098821: Crash in system dictionary initialization with shared strings

Map string regions after the compressed class base is known

Co-authored-by: Mikhailo Seledtsov <mikhailo.seledtsov@oracle.com>
Reviewed-by: iklam, dcubed
This commit is contained in:
Coleen Phillimore 2015-06-17 21:44:48 +00:00
parent a6a13b5344
commit ac072b303d
5 changed files with 49 additions and 28 deletions

View file

@ -1001,8 +1001,6 @@ bool MetaspaceShared::map_shared_spaces(FileMapInfo* mapinfo) {
mapinfo->verify_region_checksum(md) &&
(_mc_base = mapinfo->map_region(mc)) != NULL &&
mapinfo->verify_region_checksum(mc) &&
mapinfo->map_string_regions() &&
mapinfo->verify_string_regions() &&
(image_alignment == (size_t)max_alignment()) &&
mapinfo->validate_classpath_entry_table()) {
// Success (no need to do anything)
@ -1014,7 +1012,6 @@ bool MetaspaceShared::map_shared_spaces(FileMapInfo* mapinfo) {
if (_rw_base != NULL) mapinfo->unmap_region(rw);
if (_md_base != NULL) mapinfo->unmap_region(md);
if (_mc_base != NULL) mapinfo->unmap_region(mc);
mapinfo->unmap_string_regions();
#ifndef _WINDOWS
// Release the entire mapped region
shared_rs.release();