RFR: 8358310: ZGC: riscv, ppc ZPlatformAddressOffsetBits may return a too large value

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Jun 2 08:59:29 UTC 2025


The way that ZPlatformAddressOffsetBits is implemented on riscv and ppc may result in a return value of 45. This is larger than the max supported value of 44 (because of other internal data structures). This was fixed in [JDK-8330275](https://bugs.openjdk.org/browse/JDK-8330275) for aarch64.

Before [JDK-8350441](https://bugs.openjdk.org/browse/JDK-8350441) the issue on manifested if one tried to select a heap larger than 16 TB (not supported), but after [JDK-8350441](https://bugs.openjdk.org/browse/JDK-8350441) we try to double the heap address space when running on a NUMA machine. So we may now encounter this bug for heaps larger than 8TB (which is supported).

While ZPlatformAddressOffsetBits needs an overhaul. (It was written for non-generational ZGC where we had the three color bits inside the address.) The proposal is that we solve this for ppc and riscv by doing the same thing we did for aarch64 in [JDK-8330275](https://bugs.openjdk.org/browse/JDK-8330275)

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

Commit messages:
 - 8358310: ZGC: riscv, ppc ZPlatformAddressOffsetBits may return a too large value

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

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


More information about the hotspot-dev mailing list