8360817: [ubsan] zDirector select_worker_threads - outside the range of representable values issue

Reviewed-by: aboldtch, lucy
This commit is contained in:
Matthias Baesken 2025-07-30 12:28:14 +00:00
parent c851735631
commit 16da81eb43

View File

@ -556,7 +556,7 @@ static double calculate_young_to_old_worker_ratio(const ZDirectorStats& stats) {
const double old_vs_young_efficiency_ratio = current_old_bytes_freed_per_gc_time / current_young_bytes_freed_per_gc_time;
return old_vs_young_efficiency_ratio;
return MIN2(old_vs_young_efficiency_ratio, (double)ZOldGCThreads);
}
static bool rule_major_proactive(const ZDirectorStats& stats) {