RFR: 8357155: [asan] ZGC does not work (x86_64 and ppc64) [v2]

Martin Doerr mdoerr at openjdk.org
Mon Jun 2 10:40:54 UTC 2025


On Fri, 30 May 2025 14:37:56 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   remove aarch64 from the change, adjust ppc64
>
> src/hotspot/cpu/ppc/gc/z/zAddress_ppc.cpp line 95:
> 
>> 93:   const size_t max_address_offset_bits = valid_max_address_offset_bits - 3;
>> 94: #ifdef ADDRESS_SANITIZER
>> 95:   return max_address_offset_bits;
> 
> I think this actually has to be 
> ```c++
>   return MIN2(valid_max_address_offset_bits, 44);
> 
> 
> Because the way we probe we may otherwise return 45 here. Which could result in more than 44 bits in a ZOffset which our internal data structures cannot handle. Hopefully this still works for ASAN on PPC. (The `-3` is a left over from non-generational ZGC). Aarch64 could do the same, but it does not have this issue as it starts its probing at bit 46, not bit 47.
> 
> _Side note: This makes me realise that there probably is a bug here on PPC and RISCV if running on a NUMA machine with more than 8 TB heap. As after ZGlobalsPointers::min_address_offset_request() was introduced we can return 45 from this function._

@xmas92: Thanks for looking into this! Should we set `DEFAULT_MAX_ADDRESS_BIT = 44` and use the constant?
Or maybe file a separate issue for fixing that on aarch64, PPC64 and riscv?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25549#discussion_r2120738138


More information about the hotspot-dev mailing list