mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8028497: SIGSEGV at ClassLoaderData::oops_do(OopClosure*, KlassClosure*, bool)
Keep class in CLD::_klasses list and mirror created for CDS classes if OOM during restore_shareable_info(). This keeps pointers consistent for CMS. Reviewed-by: ehelin, stefank, jmasa, iklam
This commit is contained in:
parent
eea84b4feb
commit
c8990959f2
14 changed files with 109 additions and 139 deletions
|
@ -4180,8 +4180,12 @@ ClassFileParser::~ClassFileParser() {
|
|||
|
||||
clear_class_metadata();
|
||||
|
||||
// deallocate the klass if already created.
|
||||
MetadataFactory::free_metadata(_loader_data, _klass);
|
||||
// deallocate the klass if already created. Don't directly deallocate, but add
|
||||
// to the deallocate list so that the klass is removed from the CLD::_klasses list
|
||||
// at a safepoint.
|
||||
if (_klass != NULL) {
|
||||
_loader_data->add_to_deallocate_list(_klass);
|
||||
}
|
||||
_klass = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue