[llvm] Add step to lower ASLR bits to 28 when running libc++ sanitizer builds. (PR #146273)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 29 09:14:40 PDT 2025
https://github.com/EricWF created https://github.com/llvm/llvm-project/pull/146273
The libc++ sanitizer bots have been broken for a while. This appears to be related to ASLR, since it only occurs when vm.mmap_rnd_bits > 28.
This change attempts to address this issue by lowing the ASLR bits to 28 (though allegedly LLVM 21 supports ASLR up to 32 bits?).
>From 74813d6d3506755d06c8314aae432e82f9030502 Mon Sep 17 00:00:00 2001
From: Eric Fiselier <eric at efcs.ca>
Date: Sun, 29 Jun 2025 12:11:53 -0400
Subject: [PATCH] Add step to lower ASLR bits to 28 when running sanitizer
builds.
The libc++ sanitizer bots have been broken for a while. This
appears to be related to ASLR, since it only occurs when
vm.mmap_rnd_bits > 28.
This change attempts to address this issue by lowing the ASLR bits
to 28 (though allegedly LLVM 21 supports ASLR up to 32 bits?).
---
.github/workflows/libcxx-build-and-test.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index f0bdf6c0b5899..da8f8848c1e25 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -166,6 +166,10 @@ jobs:
container: ghcr.io/llvm/libcxx-linux-builder:2b57ebb50b6d418e70382e655feaa619b558e254
steps:
- uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+
+ - name: Reduce ASLR for Sanitizers
+ if: ${{ matrix.config == 'generic-tsan' || matrix.config == 'generic-msan' }}
+ run: sudo sysctl vm.mmap_rnd_bits=28; sudo sysctl vm.mmap_rnd_bits;
- name: ${{ matrix.config }}
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
More information about the llvm-commits
mailing list