RFR: 8346888: [ubsan] block.cpp:1617:30: runtime error: 9.97582e+36 is outside the range of representable values of type 'int' [v2]

Matthias Baesken mbaesken at openjdk.org
Thu Mar 27 09:27:58 UTC 2025


> When running jtreg tests on macOS aarch64 with ubsan - enabled binaries, in the test
> java/foreign/TestHandshake
> this error/warning is reported :
>  
> jdk/src/hotspot/share/opto/block.cpp:1617:30: runtime error: 9.97582e+36 is outside the range of representable values of type 'int'
> UndefinedBehaviorSanitizer:DEADLYSIGNAL
> UndefinedBehaviorSanitizer: nested bug in the same thread, aborting.
>  
> Seems it happens in this calculation (float value does not fit into an int) : int to_pct = (int) ((100 * freq) / target->_freq);

Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:

  calculate from_pct like we did before, clamp to_pct

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/23962/files
  - new: https://git.openjdk.org/jdk/pull/23962/files/f8f63019..bf358c08

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23962&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23962&range=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/23962.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23962/head:pull/23962

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


More information about the hotspot-compiler-dev mailing list