Skip to content

Commit b5d8f00

Browse files
committed
Merge bitcoin/bitcoin#28814: test: symbolizer improvements
49d9532 fuzz: explicitly specify llvm-symbolizer path in runner (fanquake) Pull request description: It's not completely clear to me why this needs to be explicitly specified in some environments, and not in others, while at the same time that `llvm-symbolizer` is already in PATH, but this has fixed the 2 issues outlined in bitcoin/bitcoin#28147. Use `LLVM_SYMBOLIZER_PATH` as the env var, as that is somewhat also used inside LLVM, but not consistently, i.e it's checked for in the asan_symbolize script, but not in in the ubsan_symbolize script, or from in compiler-rt. Alternative to #28804. ACKs for top commit: maflcko: lgtm ACK 49d9532 Tree-SHA512: c3d5bf1c3629793b342c70754a419b3c7a3cd39f800b9aa69ce3395cc2bf83b4d46f2b329974337b94b99573cd0b8600d3f147ed5c21387bf3812316570d1ee3
2 parents 82ea4e7 + 49d9532 commit b5d8f00

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ci/test/00_setup_env_native_fuzz.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the
1818
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined,float-divide-by-zero,integer \
1919
CC='clang-17 -ftrivial-auto-var-init=pattern' CXX='clang++-17 -ftrivial-auto-var-init=pattern'"
2020
export CCACHE_MAXSIZE=200M
21+
export LLVM_SYMBOLIZER_PATH="/usr/bin/llvm-symbolizer-17"

test/fuzz/test_runner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616

1717

1818
def get_fuzz_env(*, target, source_dir):
19+
symbolizer = os.environ.get('LLVM_SYMBOLIZER_PATH', "/usr/bin/llvm-symbolizer")
1920
return {
2021
'FUZZ': target,
2122
'UBSAN_OPTIONS':
2223
f'suppressions={source_dir}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1',
24+
'UBSAN_SYMBOLIZER_PATH':symbolizer,
2325
"ASAN_OPTIONS": "detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1",
26+
'ASAN_SYMBOLIZER_PATH':symbolizer,
2427
}
2528

2629

0 commit comments

Comments
 (0)