Skip to content

Commit

Permalink
8319379: G1: gc/logging/TestUnifiedLoggingSwitchStress.java crashes a…
Browse files Browse the repository at this point in the history
…fter JDK-8318894

Reviewed-by: tschatzl, sjohanss
  • Loading branch information
albertnetymk committed Nov 6, 2023
1 parent b5c863b commit 8fb94fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hotspot/share/gc/g1/g1SurvRateGroup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class G1SurvRateGroup : public CHeapObj<mtGC> {
double surv_rate_pred(G1Predictions const& predictor, uint age) const {
assert(is_valid_age(age), "must be");

// _stats_arrays_length might not be in sync with _num_added_regions in Cleanup pause.
age = MIN2(age, _stats_arrays_length - 1);

return predictor.predict_in_unit_interval(_surv_rate_predictors[age]);
}

Expand Down

1 comment on commit 8fb94fd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.