--- old/src/share/vm/oops/constantPool.cpp Wed Nov 26 00:35:42 2014 +++ new/src/share/vm/oops/constantPool.cpp Wed Nov 26 00:35:42 2014 @@ -1597,7 +1597,7 @@ // This function fills in SymbolHashMaps, one for utf8s and one for // class names, returns size of the cpool raw bytes. jint ConstantPool::hash_entries_to(SymbolHashMap *symmap, - SymbolHashMap *classmap) { + SymbolHashMap *classmap) { jint size = 0; for (u2 idx = 1; idx < length(); idx++) { @@ -1636,8 +1636,8 @@ // -1, in case of internal error // > 0, count of the raw cpool bytes that have been copied int ConstantPool::copy_cpool_bytes(int cpool_size, - SymbolHashMap* tbl, - unsigned char *bytes) { + SymbolHashMap* tbl, + unsigned char *bytes) { u2 idx1, idx2; jint size = 0; jint cnt = length(); @@ -1709,10 +1709,15 @@ case JVM_CONSTANT_String: { *bytes = JVM_CONSTANT_String; Symbol* sym = unresolved_string_at(idx); - idx1 = tbl->symbol_to_value(sym); - assert(idx1 != 0, "Have not found a hashtable entry"); + if (is_pseudo_string_at(idx)) { + idx1 = get_pseudo_string_utf8_index(idx); + assert(idx1 != 0, "Have not found a pseudo-string placeholder entry"); + } else { + idx1 = tbl->symbol_to_value(sym); + assert(idx1 != 0, "Have not found a hashtable entry"); + } Bytes::put_Java_u2((address) (bytes+1), idx1); - DBG(printf("JVM_CONSTANT_String: idx=#%03hd, %s", idx1, sym->as_utf8())); + DBG(printf("JVM_CONSTANT_String: idx=#%03hd, %s", idx1, sym == NULL ? "NULL" : sym->as_utf8())); break; } case JVM_CONSTANT_Fieldref: