8383462: G1: scan_root_regions should guarantee that the number of workers is nonzero

Reviewed-by: stefank
This commit is contained in:
Paul Hübner 2026-04-28 05:17:25 +00:00
parent 7c1f89e411
commit 9993593689

View File

@ -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.",