RFR: 8371341: ZGC: Improve gtest interoperability with instrumented builds (ASAN)

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Nov 10 05:58:16 UTC 2025


On Wed, 5 Nov 2025 18:58:30 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> A few ZGC gtest reservers memory in valid ZAddress address ranges to mock and test different sub systems. When running in instrumented builds such as ASAN the address space we try to may be unavailable. This will cause a couple of our tests to fail.
> 
> I propose we change all out gtests to do what `test/hotspot/gtest/gc/z/test_zVirtualMemoryManager.cpp` does. Namely uses our `ZVirtualMemoryManager` to reserve the address space and skip the test incase we are not able to reserve an adequate address range to use for the test.
> 
> * Testing
>   * GHA
>   * gtest with and without ASAN, including artificially induced reservation clash with ASAN

Thanks for the reviews

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

PR Comment: https://git.openjdk.org/jdk/pull/28159#issuecomment-3509539139


More information about the hotspot-gc-dev mailing list