Integrated: 8292318: Memory corruption in remove_dumptime_info

Ioi Lam iklam at openjdk.org
Mon Aug 22 03:46:43 UTC 2022


On Tue, 16 Aug 2022 03:48:49 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> In [JDK-8290833](https://bugs.openjdk.org/browse/JDK-8290833) (#9759), I added a table (`SystemDictionaryShared::_saved_cpcache_entries_table`) that remembers the initial state of a `ConstantPoolCache` during CDS dumping. This table is indexed with a `ConstantPoolCache*`
> 
> However, `ConstantPoolCache` has a complex lifecycle, especially with class redefinition. This makes it difficult to clean up the table. The crash reported in [the current bug](https://bugs.openjdk.org/browse/JDK-8292318) happened during clean up, probably because an `InstanceKlass` was still valid but its `ConstantPool` or `ConstantPoolCache` were not.
> 
> For simplification, I am now storing the information inside the `ConstantPoolCache`. To compensate for the extra space used, I moved two 32-bit integers next to each other, so the net change in size is zero.
> 
> instanceKlass.cpp was reverted to the state before #9759.

This pull request has now been integrated.

Changeset: 27b0f772
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/27b0f7726b70127c0ed714cfc1041d3da71a9dc3
Stats:     108 lines in 7 files changed: 23 ins; 69 del; 16 mod

8292318: Memory corruption in remove_dumptime_info

Reviewed-by: coleenp, ccheung

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

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


More information about the hotspot-dev mailing list