RFR: 8336912: G1: Undefined behavior for G1ConfidencePercent=0

Thomas Schatzl tschatzl at openjdk.org
Mon Jul 29 11:10:00 UTC 2024


Hello,

  please review this change to workaround an unintentional division by zero found by ubsan.

The global option `G1ConfidencePercent` allowed zero as confidence for predictions which this change simply disallows: not sure what the response of the VM would be if the user told it that it should have absolutely no confidence (i.e. confidence is zero) in the predictions (not "very low" confidence).

Testing: after this change, the ubsan failure goes away.

Thanks,
  Thomas

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

Commit messages:
 - 8336912

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

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


More information about the hotspot-gc-dev mailing list