8224692: runtime/appcds tests crash in "HotSpotJVMCI::compute_offset" when running in Graal as JIT mode

Reviewed-by: ccheung
This commit is contained in:
Ioi Lam 2019-05-31 12:51:36 -07:00
parent 67defd71f2
commit 43e23020f2
3 changed files with 26 additions and 14 deletions

View file

@ -623,13 +623,11 @@ size_t SymbolTable::estimate_size_for_archive() {
}
void SymbolTable::write_to_archive(bool is_static_archive) {
_shared_table.reset();
_dynamic_shared_table.reset();
CompactHashtableWriter writer(int(_items_count),
&MetaspaceShared::stats()->symbol);
copy_shared_symbol_table(&writer);
if (is_static_archive) {
_shared_table.reset();
writer.dump(&_shared_table, "symbol");
// Verify table is correct
@ -639,6 +637,7 @@ void SymbolTable::write_to_archive(bool is_static_archive) {
unsigned int hash = hash_symbol(name, len, _alt_hash);
assert(sym == _shared_table.lookup(name, hash, len), "sanity");
} else {
_dynamic_shared_table.reset();
writer.dump(&_dynamic_shared_table, "symbol");
}
}