RFR: 8266330: itableMethodEntry::initialize() asserts with archived old classes [v2]
Calvin Cheung
ccheung at openjdk.java.net
Mon May 10 16:29:13 UTC 2021
> #ifdef ASSERT
> if (MetaspaceShared::is_in_shared_metaspace((void*)&_method) &&
> !MetaspaceShared::remapped_readwrite() &&
> !MetaspaceShared::is_old_class(m->method_holder())) {
> // At runtime initialize_itable is rerun as part of link_class_impl()
> // for a shared class loaded by the non-boot loader.
> // The dumptime itable method entry should be the same as the runtime entry.
> assert(_method == m, "sanity");
> }
> #endif
>
>
> The above includes the check for !MetaspaceShared::is_old_class(m->method_holder()).
> While the method_holder() is not an old class, the _klass in the klassITable could be an old class.
> The proposed fix is to have the caller of the above function pass in the _klass and add another check
> making sure the _klass is not an old class before the assert.
>
> Testing:
> - [x] tiers 1 and 2 (including the new test)
Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
fix minor nit
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/3930/files
- new: https://git.openjdk.java.net/jdk/pull/3930/files/6b83ea9f..6d31bae8
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3930&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3930&range=00-01
Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/3930.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3930/head:pull/3930
PR: https://git.openjdk.java.net/jdk/pull/3930
More information about the hotspot-runtime-dev
mailing list