Skip to content

Commit dd97d54

Browse files
committed
ci: locate sanitizer symbolizer reliably
1 parent a766008 commit dd97d54

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,14 @@ jobs:
310310
uses: actions-rust-lang/setup-rust-toolchain@v1
311311
with:
312312
toolchain: ${{ env.SANITIZER_TOOLCHAIN }}
313-
components: rust-src, llvm-tools-preview
313+
components: |
314+
rust-src
315+
llvm-tools-preview
314316
315317
- name: Install protoc
316318
run: |
317319
sudo apt-get update
318-
sudo apt-get install -y protobuf-compiler
320+
sudo apt-get install -y protobuf-compiler llvm
319321
320322
- name: Run tests with ${{ matrix.sanitizer }} sanitizer
321323
env:
@@ -334,8 +336,8 @@ jobs:
334336
run: |
335337
set -o pipefail
336338
sanitizer_sysroot="$(rustc +${SANITIZER_TOOLCHAIN} --print sysroot)"
337-
rust_llvm_symbolizer="$sanitizer_sysroot/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-symbolizer"
338-
if [[ -x "$rust_llvm_symbolizer" ]]; then
339+
rust_llvm_symbolizer="$(find "$sanitizer_sysroot" -type f -name llvm-symbolizer -perm -111 -print -quit 2>/dev/null || true)"
340+
if [[ -n "$rust_llvm_symbolizer" ]]; then
339341
export ASAN_SYMBOLIZER_PATH="$rust_llvm_symbolizer"
340342
elif command -v llvm-symbolizer >/dev/null 2>&1; then
341343
export ASAN_SYMBOLIZER_PATH="$(command -v llvm-symbolizer)"

0 commit comments

Comments
 (0)