On Thu, 9 Jan 2025 15:13:01 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
> When running ubsan-enabled binaries on macOS aarch64, in test > javax/management/MBeanServer/OldMBeanServerTest.java > the following division by zero is shown : > src/jdk.management/macosx/native/libmanagement_ext/UnixOperatingSystem.c:67:40: > runtime error: division by zero > UndefinedBehaviorSanitizer:DEADLYSIGNAL > UndefinedBehaviorSanitizer: nested bug in the same thread, aborting. > > We should add special handling for the case ` (total_delta == 0)` . Thanks - it is good to have this check. It had to be at least interesting, that this code is old, it's in jdk9 or earlier, and we don't seem to have seen this kind of crash before. I was thinking maybe just the timing had changed in that build, but if you can hit it in a regular build then it's not ubsan, maybe you are just lucky! The existing Linux versions that take zero ticks difference to imply zero load, make sense to me. 8-) ------------- PR Comment: https://git.openjdk.org/jdk/pull/23010#issuecomment-2582647679