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

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Nov 10 05:58:17 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

This pull request has now been integrated.

Changeset: 4e4cced7
Author:    Axel Boldt-Christmas <aboldtch at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/4e4cced710a8e4cd5bb8f49b08798c87b21e8b78
Stats:     138 lines in 5 files changed: 72 ins; 37 del; 29 mod

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

Reviewed-by: stefank, eosterlund

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

PR: https://git.openjdk.org/jdk/pull/28159


More information about the hotspot-gc-dev mailing list