--- a/hotspot/src/share/vm/memory/metaspace.cpp Mon Aug 14 16:48:44 2017 +0200
+++ b/hotspot/src/share/vm/memory/metaspace.cpp Mon Aug 14 14:32:17 2017 -0400
@@ -3347,9 +3347,9 @@
// If UseCompressedClassPointers is set then allocate the metaspace area
// above the heap and above the CDS area (if it exists).
allocate_metaspace_compressed_klass_ptrs(cds_end, cds_address);
- // Map the shared string space after compressed pointers
- // because it relies on compressed class pointers setting to work
- mapinfo->map_string_regions();
+ // map_heap_regions() compares the current narrow oop and klass encodings
+ // with the archived ones, so it must be done after all encodings are determined.
+ mapinfo->map_heap_regions();
}
#endif // _LP64
} else {