Skip to content

Commit d0649f2

Browse files
authored
chore: improve ASAN stack trace and symbolization (#475)
Use `allow_addr2line=1` so ASAN falls back to the pre-installed `addr2line` for symbolization. This avoids LLVM version mismatch issues between the system `llvm-symbolizer` and nightly Rust's LLVM, and works regardless of which LLVM version nightly uses. Also enable `force-frame-pointers` for more complete stack traces.
1 parent b43706f commit d0649f2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/sanitizer.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ jobs:
3737
- name: Run tests with ASAN
3838
env:
3939
RUST_BACKTRACE: 1
40-
RUSTFLAGS: "-Zsanitizer=address -Cdebuginfo=2"
41-
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer
42-
ASAN_OPTIONS: "symbolize=1"
40+
RUSTFLAGS: "-Zsanitizer=address -Cdebuginfo=2 -Cforce-frame-pointers=yes"
41+
ASAN_OPTIONS: "symbolize=1:allow_addr2line=1"
4342
LSAN_OPTIONS: "fast_unwind_on_malloc=0"
4443
run: |
4544
# FFI crates (C interop)

0 commit comments

Comments
 (0)