RFR: 8350643: G1: Make loop iteration variable type correspond to limit in G1SurvRateGroup

Thomas Schatzl tschatzl at openjdk.org
Tue Feb 25 12:24:21 UTC 2025


Hi all,

 in the G1SurvRateGroup class there are three loops that use a `size_t` loop iteration variable that is compared to `uint`s in the condition, causing some implicit narrowing.

Change the loop variables to also use `uints`.

Pointed out by @kimbarrett during review of JDK-8349906.

Testing: local compilation, GHA, checking other loop variables to match type

Thanks,
  Thomas

-------------

Commit messages:
 - 8350643

Changes: https://git.openjdk.org/jdk/pull/23773/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23773&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8350643
  Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/23773.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23773/head:pull/23773

PR: https://git.openjdk.org/jdk/pull/23773


More information about the hotspot-gc-dev mailing list