Merge bitcoin-core/secp256k1#1507: ci: Add workaround for ASLR bug in sanitizers

a5e8ab2484 ci: Add sanitizer env variables to debug output (Tim Ruffing)
84a93de4d2 ci: Add workaround for ASLR bug in sanitizers (Tim Ruffing)

Pull request description:

  Fixes #1506.

  This also adds the sanitizer env variables to our debug output as suggested in the same issue.

ACKs for top commit:
  sipa:
    utACK a5e8ab2484
  jonasnick:
    ACK a5e8ab2484

Tree-SHA512: 5162d14eeec01e088c600ed77e21c5ffd4dec23327b7e81b5ecac59b7c535cac97cd7b7b744c767766036dfc6d9152a9933eb326cf4065d56c46e2ee858da662
This commit is contained in:
Tim Ruffing
2024-03-20 13:25:15 +01:00
2 changed files with 6 additions and 1 deletions

View File

@@ -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 \

View File

@@ -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