RFR: 8292318: Memory corruption in remove_dumptime_info [v4]
Ioi Lam
iklam at openjdk.org
Sun Aug 21 21:59:21 UTC 2022
> 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.
Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
- Merge branch 'master' of https://github.com/openjdk/jdk into 8292318-memory-corruption-in-remove-dumptime-info-ver2
- @calvinccheung review comments
- added comments about what _initial_entries points to
- fixed old bug in test case
- 8292318: Memory corruption in remove_dumptime_info
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/9887/files
- new: https://git.openjdk.org/jdk/pull/9887/files/d69ab667..786fb685
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=9887&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=9887&range=02-03
Stats: 40064 lines in 404 files changed: 17651 ins; 20464 del; 1949 mod
Patch: https://git.openjdk.org/jdk/pull/9887.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9887/head:pull/9887
PR: https://git.openjdk.org/jdk/pull/9887
More information about the hotspot-dev
mailing list