RFR: 8338688: Shenandoah: Avoid calling java_lang_Class accessors in asserts/verifier

Aleksey Shipilev shade at openjdk.org
Tue Aug 20 17:05:52 UTC 2024


In GC verification code, we are not always safe to touch the klass directly. This becomes a problem in Lilliput, where loading klass from the from-space is erroneous. Lilliput would replace `obj->klass()` with `obj->forward_safe_klass()` to make it right in GC code. But accessors like `java_lang_Class` would not be fixed. So we are better avoiding using these `java_lang_Class` accessors in GC verification code, and use the loaded `klass` directly. 

Additional tests:
 - [ ] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah`
 - [ ] Linux x86_64 server fastdebug, `all` with `-XX:+UseShenandoahGC`

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

Commit messages:
 - Fix

Changes: https://git.openjdk.org/jdk/pull/20651/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20651&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8338688
  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/20651.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20651/head:pull/20651

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


More information about the shenandoah-dev mailing list