RFR: 8306331: assert((cnt > 0.0f) && (prob > 0.0f)) failed: Bad frequency assignment in if

Dean Long dlong at openjdk.org
Mon Apr 24 18:10:48 UTC 2023


On Thu, 20 Apr 2023 02:44:00 GMT, Dean Long <dlong at openjdk.org> wrote:

> This change removes undefined behavior caused by signed overflow, which triggered an assert with Xcode14.3+1.0-beta1 on macos aarch64.

Thanks Tobias.

After looking at the code again, I was wondering if anyone prefers using "count" instead of "counter" here, so this:

`static bool counters_are_meaningful(int counter1, int counter2, int min) {`

would become this:

`static bool counts_are_meaningful(int count1, int count2, int min) {`

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

PR Comment: https://git.openjdk.org/jdk/pull/13551#issuecomment-1520600862
PR Comment: https://git.openjdk.org/jdk/pull/13551#issuecomment-1520604228


More information about the hotspot-compiler-dev mailing list