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

Coleen Phillimore coleenp at openjdk.org
Thu Oct 17 18:46:49 UTC 2024


On Wed, 16 Oct 2024 09:57:47 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> 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

Seems reasonable.  This seems hard to write a directed test for, right?

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

Marked as reviewed by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21531#pullrequestreview-2376019183


More information about the hotspot-runtime-dev mailing list