From 9993593689cb39a63e3c80dc0b963fc4608403a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20H=C3=BCbner?= Date: Tue, 28 Apr 2026 05:17:25 +0000 Subject: [PATCH] 8383462: G1: scan_root_regions should guarantee that the number of workers is nonzero Reviewed-by: stefank --- src/hotspot/share/gc/g1/g1ConcurrentMark.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp index 9952fab5e2c..6cac1b7c1ba 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp @@ -1149,7 +1149,7 @@ bool G1ConcurrentMark::scan_root_regions(WorkerThreads* workers, bool concurrent // completing this work during GC. const uint num_workers = MIN2(num_remaining, _max_concurrent_workers); - assert(num_workers > 0, "no more remaining root regions to process"); + guarantee(num_workers > 0, "no more remaining root regions to process"); G1CMRootRegionScanTask task(this, concurrent); log_debug(gc, ergo)("Running %s using %u workers for %u work units.",