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

Martin Doerr mdoerr at openjdk.org
Tue Jun 3 08:02:00 UTC 2025


On Mon, 2 Jun 2025 09:11:05 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> Many (all?) ZGC related jtreg tests do not work when the JDK is built with address sanitizer asan enabled (configure flag --enable-asan).
>> This can be seen on SUSE Linux x86_64 and also on ppc64le , opt binaries were used.
>> It has been suggested to do a workaround -  'But I think that simply adapting the zAddress_[...].cpp implementations to always select the largest heap base would go a long way for providing ASAN compatibility.'
>> This seems to work nicely on x86_64 and ppc64le,  however the zgc related tests still fail on Linux aarch64 (should I exclude this platform from my patch?) .
>
> 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 MIN2(valid_max_address_offset_bits, (size_t)44);

I think this PR is ok, but please add a comment like "The max supported value is 44 because of other internal data structures.".

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

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


More information about the hotspot-dev mailing list