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

William Kemper wkemper at openjdk.org
Mon Mar 10 16:37:01 UTC 2025


On Mon, 10 Mar 2025 11:54:50 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Unloading classes may require a walk of unreachable oops. For this reason, it is not safe to recycle memory before class unloading is complete. This complements existing code to prevent mutators from recycling trash regions while weak roots is in progress.
>
> src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp line 153:
> 
>> 151:   }
>> 152: 
>> 153:   assert(heap->is_concurrent_weak_root_in_progress(), "Must be doing weak roots now");
> 
> This does not ring true when final mark is cancelled, or am I missing something?

There is a cancellation check just above this line.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23951#discussion_r1987650487


More information about the shenandoah-dev mailing list