mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8292318: Memory corruption in remove_dumptime_info
Reviewed-by: coleenp, ccheung
This commit is contained in:
parent
9a65524e2f
commit
27b0f7726b
7 changed files with 39 additions and 85 deletions
|
@ -576,8 +576,6 @@ void InstanceKlass::deallocate_record_components(ClassLoaderData* loader_data,
|
|||
// This function deallocates the metadata and C heap pointers that the
|
||||
// InstanceKlass points to.
|
||||
void InstanceKlass::deallocate_contents(ClassLoaderData* loader_data) {
|
||||
SystemDictionaryShared::handle_class_unloading(this);
|
||||
|
||||
// Orphan the mirror first, CMS thinks it's still live.
|
||||
if (java_mirror() != NULL) {
|
||||
java_lang_Class::set_klass(java_mirror(), NULL);
|
||||
|
@ -692,6 +690,8 @@ void InstanceKlass::deallocate_contents(ClassLoaderData* loader_data) {
|
|||
MetadataFactory::free_metadata(loader_data, annotations());
|
||||
}
|
||||
set_annotations(NULL);
|
||||
|
||||
SystemDictionaryShared::handle_class_unloading(this);
|
||||
}
|
||||
|
||||
bool InstanceKlass::is_record() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue