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

Sangheon Kim sangheki at openjdk.org
Mon Jul 29 22:02:34 UTC 2024


On Mon, 29 Jul 2024 09:11:16 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> 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

Looks good.

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

Marked as reviewed by sangheki (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20371#pullrequestreview-2206171100


More information about the hotspot-gc-dev mailing list