RFR: JDK-8329656: assertion failed in MAP_ARCHIVE_MMAP_FAILURE path: Invalid immediate -5 0

Thomas Stuefe stuefe at openjdk.org
Tue Apr 9 16:43:32 UTC 2024


It fixes an embarrassing OOB memory access when rolling the dice to get a random class space location on aarch64.

Thanks to @calvinccheung for finding this bug.

The fix is to make all relevant variables unsigned, thus preventing negative overflow.

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

Commit messages:
 - Fix overflow

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

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


More information about the hotspot-compiler-dev mailing list