Skip to content

Commit 4618374

Browse files
committed
8358310: ZGC: riscv, ppc ZPlatformAddressOffsetBits may return a too large value
Reviewed-by: eosterlund, mdoerr, fyang
1 parent 78a392a commit 4618374

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
#include <sys/mman.h>
3535
#endif // LINUX
3636

37-
// Default value if probing is not implemented for a certain platform: 128TB
38-
static const size_t DEFAULT_MAX_ADDRESS_BIT = 47;
39-
// Minimum value returned, if probing fails: 64GB
37+
// Default value if probing is not implemented for a certain platform
38+
// Max address bit is restricted by implicit assumptions in the code, for instance
39+
// the bit layout of ZForwardingEntry or Partial array entry (see ZMarkStackEntry) in mark stack
40+
static const size_t DEFAULT_MAX_ADDRESS_BIT = 46;
41+
// Minimum value returned, if probing fail
4042
static const size_t MINIMUM_MAX_ADDRESS_BIT = 36;
4143

4244
static size_t probe_valid_max_address_bit() {

src/hotspot/cpu/riscv/gc/z/zAddress_riscv.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
#include <sys/mman.h>
3737
#endif // LINUX
3838

39-
// Default value if probe is not implemented for a certain platform: 128TB
40-
static const size_t DEFAULT_MAX_ADDRESS_BIT = 47;
41-
// Minimum value returned, if probing fails: 64GB
39+
// Default value if probing is not implemented for a certain platform
40+
// Max address bit is restricted by implicit assumptions in the code, for instance
41+
// the bit layout of ZForwardingEntry or Partial array entry (see ZMarkStackEntry) in mark stack
42+
static const size_t DEFAULT_MAX_ADDRESS_BIT = 46;
43+
// Minimum value returned, if probing fail
4244
static const size_t MINIMUM_MAX_ADDRESS_BIT = 36;
4345

4446
static size_t probe_valid_max_address_bit() {

0 commit comments

Comments
 (0)