Skip to content

8357155: [asan] ZGC does not work (x86_64 and ppc64) #1908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,15 @@ static size_t probe_valid_max_address_bit() {
size_t ZPlatformAddressOffsetBits() {
const static size_t valid_max_address_offset_bits = probe_valid_max_address_bit() + 1;
const size_t max_address_offset_bits = valid_max_address_offset_bits - 3;
#ifdef ADDRESS_SANITIZER
// The max supported value is 44 because of other internal data structures.
return MIN2(valid_max_address_offset_bits, (size_t)44);
#else
const size_t min_address_offset_bits = max_address_offset_bits - 2;
const size_t address_offset = round_up_power_of_2(MaxHeapSize * ZVirtualToPhysicalRatio);
const size_t address_offset_bits = log2i_exact(address_offset);
return clamp(address_offset_bits, min_address_offset_bits, max_address_offset_bits);
#endif
}

size_t ZPlatformAddressHeapBaseShift() {
Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/cpu/x86/gc/z/zAddress_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@
size_t ZPointerLoadShift;

size_t ZPlatformAddressOffsetBits() {
#ifdef ADDRESS_SANITIZER
return 44;
#else
const size_t min_address_offset_bits = 42; // 4TB
const size_t max_address_offset_bits = 44; // 16TB
const size_t address_offset = round_up_power_of_2(MaxHeapSize * ZVirtualToPhysicalRatio);
const size_t address_offset_bits = log2i_exact(address_offset);
return clamp(address_offset_bits, min_address_offset_bits, max_address_offset_bits);
#endif
}

size_t ZPlatformAddressHeapBaseShift() {
Expand Down