Merge
authorjiangli
Tue, 15 Aug 2017 18:19:18 -0400
changeset 46817 a27c007d05bb
parent 46816 f64eb2bfb250 (diff)
parent 46815 58689a7ca4e0 (current diff)
child 46818 d0475215ae39
Merge
--- a/hotspot/src/share/vm/oops/constantPool.cpp	Tue Aug 15 14:03:52 2017 +0000
+++ b/hotspot/src/share/vm/oops/constantPool.cpp	Tue Aug 15 18:19:18 2017 -0400
@@ -264,7 +264,9 @@
       oop p = rr->obj_at(i);
       if (p != NULL) {
         int index = object_to_cp_index(i);
-        if (tag_at(index).is_string()) {
+        // Skip the entry if the string hash code is 0 since the string
+        // is not included in the shared string_table, see StringTable::copy_shared_string.
+        if (tag_at(index).is_string() && java_lang_String::hash_code(p) != 0) {
           oop op = StringTable::create_archived_string(p, THREAD);
           // If the String object is not archived (possibly too large),
           // NULL is returned. Also set it in the array, so we won't