提交 0803e379 编写于 作者: S shshahma

8158373: SIGSEGV: Metadata::mark_on_stack

Summary: MetadataOnStackMark must be done before calling free_deallocate_list().
Reviewed-by: coleenp, sspitsyn
上级 c181c50f
......@@ -318,10 +318,6 @@ void ClassLoaderData::unload() {
}
tty->print_cr("]");
}
// In some rare cases items added to this list will not be freed elsewhere.
// To keep it simple, just free everything in it here.
free_deallocate_list();
}
oop ClassLoaderData::keep_alive_object() const {
......@@ -817,6 +813,12 @@ void ClassLoaderDataGraph::free_deallocate_lists() {
// called on all alive classes. See the comment in ClassLoaderDataGraph::clean_metaspaces.
cld->free_deallocate_list();
}
// In some rare cases items added to the unloading list will not be freed elsewhere.
// To keep it simple, walk the _unloading list also.
for (ClassLoaderData* cld = _unloading; cld != _saved_unloading; cld = cld->next()) {
cld->free_deallocate_list();
}
}
// CDS support
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册