RFR: 8351444: Shenandoah: Class Unloading may encounter recycled oops

Aleksey Shipilev shade at openjdk.org
Mon Mar 10 19:47:53 UTC 2025


On Mon, 10 Mar 2025 17:28:59 GMT, William Kemper <wkemper at openjdk.org> wrote:

> It isn't just about trash regions. This path through the barrier will also allow access to objects in the collection set (without evacuating them). We also choose the collection set during the final mark safepoint. Alternatively, we could soften the constraint for `ShenandoahHeap::is_in` to allow access to trash regions if concurrent weak roots is in progress.

Yes, also `cset`. My point is that conceptually, `trash` means trash, and we should not be accessing it. So if something is not trash yet (including references from weak roots), it should not be labeled `trash` then. With this patch, we are kinda stretching the definition. Which is fine for a local patch, but this over-stretching should be resolved, so it does not haunt us in future.

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

PR Comment: https://git.openjdk.org/jdk/pull/23951#issuecomment-2711652598


More information about the shenandoah-dev mailing list