From 487f85c60b18206ad86b5874687083ec3c44c872 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 14 Mar 2024 04:29:33 -0400 Subject: [PATCH] ci: reduce ASLR entropy (#3461) This week, a random segfault occurred in GHA when using `-fsanitize=leak`. It seems related to https://github.com/actions/runner-images/issues/9491. Workaround: https://github.com/actions/runner-images/issues/9491#issuecomment-1989718917 See also: https://stackoverflow.com/questions/77894856/possible-bug-in-gcc-sanitizers Signed-off-by: Jinzhe Zeng --- .github/workflows/test_cc.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test_cc.yml b/.github/workflows/test_cc.yml index d98f8ca58d..0e2243b75e 100644 --- a/.github/workflows/test_cc.yml +++ b/.github/workflows/test_cc.yml @@ -31,6 +31,10 @@ jobs: run: | wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.1.2%2Bcpu.zip -O libtorch.zip unzip libtorch.zip + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + if: ${{ matrix.check_memleak }} - run: | export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/libtorch source/install/test_cc_local.sh