RFR: 8371341: ZGC: Improve gtest interoperability with instrumented builds (ASAN)
Erik Österlund
eosterlund at openjdk.org
Thu Nov 6 13:36:10 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
Looks good.
-------------
Marked as reviewed by eosterlund (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28159#pullrequestreview-3428215256
More information about the hotspot-gc-dev
mailing list