RFR: 8268078: ClassListParser::_interfaces should be freed [v2]

Calvin Cheung ccheung at openjdk.java.net
Tue Jun 15 22:50:37 UTC 2021


On Tue, 15 Jun 2021 22:29:11 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/cds/classListParser.cpp line 94:
>> 
>>> 92:   delete _indy_items;
>>> 93:   delete _interfaces;
>>> 94:   cleanup_table();
>> 
>> I just realized that the `_id2klass_table` contains only `InstanceKlass*` values, so there's no need to clean up the values themselves (the InstanceKlass should keep on living after the table is deallocated).
>> 
>> It's the entries of `_id2klass_table` that need to be freed, but that should be done separately. See [JDK-8267752](https://bugs.openjdk.java.net/browse/JDK-8267752)
>> 
>> So I think the changes related to `_id2klass_table` in this PR are no longer needed. Sorry for pointing you to the wrong direction. The rest looks OK to me.
>
> Yes, I have a PR for JDK-8267752.  The release_C_heap_structures shouldn't be called until the classes are either unloaded or deallocated.

Ioi, Coleen, Yumin, thanks for the review.
I've reverted the changes related to `_id2klass_table`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4498


More information about the hotspot-runtime-dev mailing list