RFR: 8292318: Memory corruption in remove_dumptime_info [v2]
Calvin Cheung
ccheung at openjdk.org
Fri Aug 19 22:20:39 UTC 2022
On Fri, 19 Aug 2022 01:15:43 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> 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.
The non NULL check is good.
-------------
PR: https://git.openjdk.org/jdk/pull/9887
More information about the hotspot-dev
mailing list