]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA/linux: add sysctl trick to work-around GitHub runner issue
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Mar 2024 11:56:39 +0000 (12:56 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Mar 2024 13:04:23 +0000 (14:04 +0100)
The GitHub image runner update from 20240304.1.0 to 20240310.1
introduces a problem for clang-14. The issue is caused by
incompatibility between llvm 14 provided in ubuntu-22.04 image and the
much newer kernel configured with high-entropy ASLR.

As a work-around, we issue a sysctl command to lower the entropy and get
clang-14 to work again.

URL: https://github.com/actions/runner-images/issues/9491

Closes #13124

.github/workflows/linux.yml

index 3d447a871bc19e0977169272b901d65a751167aa..b033340842ba4da8e62c97e81d2b00daf3f6adb2 100644 (file)
@@ -139,7 +139,7 @@ jobs:
               CFLAGS="-fsanitize=memory -Wformat -Werror=format-security -Werror=array-bounds -g"
               LDFLAGS="-fsanitize=memory"
               LIBS="-ldl"
-              --without-ssl --without-zlib --without-brotli --without-zstd --without-libpsl --without-nghttp2 --enable-debug --enable-websocketsx
+              --without-ssl --without-zlib --without-brotli --without-zstd --without-libpsl --without-nghttp2 --enable-debug --enable-websockets
             singleuse: --unit
 
           - name: event-based
@@ -197,6 +197,14 @@ jobs:
 
       - uses: actions/checkout@v4
 
+      - name: Fix kernel mmap rnd bits
+        # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
+        # high-entropy ASLR in much newer kernels that GitHub runners are
+        # using leading to random crashes: https://reviews.llvm.org/D148280
+        # See https://github.com/actions/runner-images/issues/9491
+        continue-on-error: true
+        run: sudo sysctl vm.mmap_rnd_bits=28
+
       - if: contains(matrix.build.install_steps, 'gcc-11')
         run: |
           sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa