RFR: 8342334: CDS: Scratch mirrors should not point to dead klasses

Aleksey Shipilev shade at openjdk.org
Wed Oct 16 10:09:23 UTC 2024


See the symptoms and discussions in the bug. The fix does the same thing we do for normal CM->IK link during the deallocation:
https://github.com/openjdk/jdk/blob/ebc17c7c8d6febd5a887309d1b7a466bcd2cc0a9/src/hotspot/share/oops/instanceKlass.cpp#L592-L594

...but for scratch mirrors allocated by CDS dumping code.

Additional testing:
 - [x] Linux x86_64 server fastdebug, `runtime/cds`
 - [x]  Linux x86_64 server fastdebug, `runtime/cds` with [JDK-8341913](https://bugs.openjdk.org/browse/JDK-8341913) and Shenandoah enabled -- used to reliably crash, now it does not

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

Commit messages:
 - Tighten up comments
 - Fix

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

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


More information about the hotspot-runtime-dev mailing list