[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:28:04 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-github-workflow

Author: Eric (EricWF)

<details>
<summary>Changes</summary>

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?).

---
Full diff: https://github.com/llvm/llvm-project/pull/146273.diff


1 Files Affected:

- (modified) .github/workflows/libcxx-build-and-test.yaml (+4) 


``````````diff
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:

``````````

</details>


https://github.com/llvm/llvm-project/pull/146273


More information about the llvm-commits mailing list