Skip to content

Commit fa0dfa1

Browse files
committed
github: Reduce ASLR entropy to be compatible with asan in llvm 14.
Starting with image version 20240310.1.0, GitHub runners are using 32-bit entropy for ASLR: $ sudo sysctl -a | grep vm.mmap.rnd vm.mmap_rnd_bits = 32 vm.mmap_rnd_compat_bits = 16 This breaks all the asan-enabled builds, because older asan gets confused by memory mappings and crashes with segmentation fault. The issue is fixed in newer releases of llvm: llvm/llvm-project@fb77ca0 https://reviews.llvm.org/D148280 But these are not available in Ubuntu 22.04 image. This should be fixed by GitHub, but until new images are available reducing ASLR entropy manually to 28 bits to make builds work. Reported-at: actions/runner-images#9491 Acked-by: Eelco Chaudron <[email protected]> Acked-by: Dumitru Ceara <[email protected]> Acked-by: Aaron Conole <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
1 parent 33f45de commit fa0dfa1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/build-and-test.yml

+8
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,14 @@ jobs:
238238
if: matrix.m32 != ''
239239
run: sudo apt install -y gcc-multilib
240240

241+
- name: Reduce ASLR entropy
242+
if: matrix.sanitizers != ''
243+
# Asan in llvm 14 provided in ubuntu-22.04 is incompatible with
244+
# high-entropy ASLR configured in much newer kernels that GitHub
245+
# runners are using leading to random crashes:
246+
# https://github.com/actions/runner-images/issues/9491
247+
run: sudo sysctl -w vm.mmap_rnd_bits=28
248+
241249
- name: prepare
242250
run: ./.ci/linux-prepare.sh
243251

0 commit comments

Comments
 (0)