diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index ff68a7a024b..992a0d6e30a 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -122,6 +122,8 @@ jobs: with: entrypoint: /bin/rm args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }} + - name: Lower ASLR entropy for TSan + run: sudo sysctl vm.mmap_rnd_bits=28 - name: Build uses: docker://ghcr.io/su2code/su2/build-su2-tsan:261011-1107 with: @@ -324,6 +326,8 @@ jobs: done chmod a+x $BIN_FOLDER/* ls -lahR $BIN_FOLDER + - name: Lower ASLR entropy for TSan + run: sudo sysctl vm.mmap_rnd_bits=28 - name: Run Tests in Container uses: docker://ghcr.io/su2code/su2/test-su2-tsan:261011-1107 env: diff --git a/preconfigure.py b/preconfigure.py index bfba6995c5b..f379baa9f86 100755 --- a/preconfigure.py +++ b/preconfigure.py @@ -73,6 +73,13 @@ def build_ninja(): # Specify C++17 env = os.environ.copy() env["CXXFLAGS"] = env.get("CXXFLAGS", "") + " -std=c++17" + # ninja is a build tool and must not be instrumented by sanitizers + for var in ("CFLAGS", "CXXFLAGS", "LDFLAGS"): + env[var] = " ".join( + f + for f in env.get(var, "").split() + if not f.startswith("-fsanitize") + ) subprocess.run( ["python3", "configure.py", "--bootstrap"], cwd=ninjapath, env=env )