From a42d45f5a48f1f7528cee4b6d8e1b0b932d0c1c7 Mon Sep 17 00:00:00 2001 From: bhuvan-somisetty Date: Thu, 12 Nov 2026 01:22:34 +0530 Subject: [PATCH 1/2] ci: lower mmap_rnd_bits for address and thread sanitizer jobs ubuntu-latest moved to ubuntu-26.04, and its kernel uses more mmap random bits than the sanitizers support, so every thread sanitizer test dies at startup with "unexpected memory mapping". The setting belongs to the host kernel and docker containers can not change it, so set vm.mmap_rnd_bits=28 on the runner before the tests start. Only the GCC sanitizer jobs and the clang address and thread sanitizer jobs get it. --- .github/workflows/linux-test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/linux-test.yml b/.github/workflows/linux-test.yml index dd43731447..b40e4d5141 100644 --- a/.github/workflows/linux-test.yml +++ b/.github/workflows/linux-test.yml @@ -61,6 +61,9 @@ jobs: with: fetch-depth: 0 + - name: Reduce mmap ASLR entropy for sanitizers + run: sudo sysctl vm.mmap_rnd_bits=28 + - name: Install, build and run thread sanitizer tests run: ./docker-compose.sh test-${{ matrix.sanitizer }} env: @@ -107,6 +110,10 @@ jobs: with: fetch-depth: 0 + - name: Reduce mmap ASLR entropy for sanitizers + if: matrix.clang != 'clang' + run: sudo sysctl vm.mmap_rnd_bits=28 + - name: Install, build and run Clang tests run: ./docker-compose.sh test-${{ matrix.clang }} env: From 11fbea4cf7996ed063c4efe5d1181ca962778cea Mon Sep 17 00:00:00 2001 From: bhuvan-somisetty Date: Thu, 12 Nov 2026 03:39:27 +0530 Subject: [PATCH 2/2] ci: name the clang sanitizer jobs that lower mmap_rnd_bits Check for the address and thread sanitizer entries explicitly, so a new entry added to the clang matrix does not get the sysctl by accident. --- .github/workflows/linux-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-test.yml b/.github/workflows/linux-test.yml index b40e4d5141..c9f824769f 100644 --- a/.github/workflows/linux-test.yml +++ b/.github/workflows/linux-test.yml @@ -111,7 +111,7 @@ jobs: fetch-depth: 0 - name: Reduce mmap ASLR entropy for sanitizers - if: matrix.clang != 'clang' + if: matrix.clang == 'clang-address-sanitizer' || matrix.clang == 'clang-thread-sanitizer' run: sudo sysctl vm.mmap_rnd_bits=28 - name: Install, build and run Clang tests