From 84a93de4d2ba1063aa3d67d592db8ae0bb4a307e Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Tue, 19 Mar 2024 17:15:14 +0100 Subject: [PATCH 1/2] ci: Add workaround for ASLR bug in sanitizers Fixes #1506. --- .github/actions/run-in-docker-action/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/run-in-docker-action/action.yml b/.github/actions/run-in-docker-action/action.yml index dbfaa4fe..126abc2d 100644 --- a/.github/actions/run-in-docker-action/action.yml +++ b/.github/actions/run-in-docker-action/action.yml @@ -36,6 +36,10 @@ runs: load: true cache-from: type=gha + - # Workaround for https://github.com/google/sanitizers/issues/1614 . + run: sudo sysctl -w vm.mmap_rnd_bits=28 + shell: bash + - # Tell Docker to pass environment variables in `env` into the container. run: > docker run \ From a5e8ab248447864873eae9b00f94175594477d66 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Tue, 19 Mar 2024 17:17:13 +0100 Subject: [PATCH 2/2] ci: Add sanitizer env variables to debug output --- ci/ci.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/ci.sh b/ci/ci.sh index 9cc71595..3999af4f 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -17,7 +17,8 @@ print_environment() { SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS\ EXAMPLES \ HOST WRAPPER_CMD \ - CC CFLAGS CPPFLAGS AR NM + CC CFLAGS CPPFLAGS AR NM \ + UBSAN_OPTIONS ASAN_OPTIONS LSAN_OPTIONS do eval "isset=\${$var+x}" if [ -n "$isset" ]; then