RFR: 8366145: Help diagnose ubsan division by zero in computing pause time ratios

Kim Barrett kbarrett at openjdk.org
Wed Aug 27 14:21:48 UTC 2025


On Wed, 27 Aug 2025 14:11:10 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> just the one suggested in the Suggestion box is good enough.
>
> I think `fabs` is just clutter, and doesn't add anything.

I think checking for zero is fine, rather than some small interval. We're
trying to figure out how someone got a ubsan divide-by-zero complaint in the
next statement. It's a supposition that a broken (insufficiently granular)
clock was involved. If that's the case, checking for a small interval won't
change anything, as the coarse clock will either not tick, or tick by some
largish amount.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26939#discussion_r2304081159


More information about the hotspot-gc-dev mailing list