RFR: 8344104: TestMergeStores fails with ArrayIndexOutOfBoundException

Emanuel Peter epeter at openjdk.org
Wed Nov 13 15:42:16 UTC 2024


Test-bug: `RANDOM.nextInt()` would occasionally return a `min_int`. And sadly this overflows: `Math.abs(min_int) == min_int`. Wen we calculate it `% 100`, it still gives us a negative value, and we end up out of bounds. Fixed with a mask.

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

Commit messages:
 - JDK-8344104

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

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


More information about the hotspot-compiler-dev mailing list