RFR: 8339916: AIOOBE due to Math.abs(Integer.MIN_VALUE) in tests

Andrew Haley aph at openjdk.org
Thu Nov 21 17:26:26 UTC 2024


Test bug.

Another bug caused by the result of `Math.abs()` being negative. I also tried `floorMod()`, which would have been cleaner, but it increased the runtime of this extremely time-sensitive benchmark.

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

Commit messages:
 - Fix integer overflow in abs()

Changes: https://git.openjdk.org/jdk/pull/22297/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22297&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8339916
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/22297.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22297/head:pull/22297

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


More information about the core-libs-dev mailing list