RFR: 8292318: Memory corruption in remove_dumptime_info [v2]

Ioi Lam iklam at openjdk.org
Fri Aug 19 01:20:43 UTC 2022


On Wed, 17 Aug 2022 04:55:31 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   added comments about what _initial_entries points to
>
> src/hotspot/share/oops/cpCache.cpp line 722:
> 
>> 720: #if INCLUDE_CDS
>> 721:   MetadataFactory::free_array<ConstantPoolCacheEntry>(data, _initial_entries);
>> 722:   _initial_entries = NULL;
> 
> Should the above be inside the following condition like before?
> 
> `if (Arguments::is_dumping_archive()) {`

I added a more strict check -- since _initial_entries is set only during CDS dump time, I added an assert that if _initial_entries  is non NULL, we must be dumping.

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

PR: https://git.openjdk.org/jdk/pull/9887


More information about the hotspot-dev mailing list