From 48e04e885ab4b462e8c6b5077c4cd5c81de37e65 Mon Sep 17 00:00:00 2001 From: Xiaolong Peng Date: Fri, 16 Jan 2026 01:15:28 -0800 Subject: [PATCH] Fix assert in concurrent_set_update_watermark --- src/hotspot/share/gc/shenandoah/shenandoahAllocator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/gc/shenandoah/shenandoahAllocator.cpp b/src/hotspot/share/gc/shenandoah/shenandoahAllocator.cpp index 19820e62358..ad7d7026803 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahAllocator.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahAllocator.cpp @@ -274,7 +274,11 @@ HeapWord* ShenandoahAllocator::allocate_in(ShenandoahHeapRegion // For GC allocations, we advance update_watermark because the objects relocated into this memory during // evacuation are not updated during evacuation. For both young and old regions r, it is essential that all // PLABs be made parsable at the end of evacuation. This is enabled by retiring all plabs at end of evacuation. - region->concurrent_set_update_watermark(IS_SHARED_ALLOC_REGION ? region->volatile_top() : region->top()); + if (IS_SHARED_ALLOC_REGION) { + region->concurrent_set_update_watermark(region->top()); + } else { + region->set_update_watermark(region->top()); + } } if (!IS_SHARED_ALLOC_REGION && region->free_words() < PLAB::min_size()) {