Skip to content

Commit 296d4ae

Browse files
authored
NFC: Add LSAN leak suppression to ASAN pipeline (#7503)
Address-sanitizer reports a leak coming from the dynamic shared library loading code, though dlopen() is paired with dlclose(). This leak doesn't manifest on main yet because dxc adds dxcompiler directly to target_link_libraries (which it shouldn't have to), and dxil is loaded within that library. A PR to remove dxil loading from dxcompiler exposes the leak when dxc loads dxil dynamically. This change adds a suppressions file for LSAN to suppress the leak in the loader code that happens under call_init. This also changes the Linux_Clang_Release build to RelWithDebInfo so symbols are present.
1 parent 8a8b29f commit 296d4ae

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

azure-pipelines.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ stages:
5656

5757
strategy:
5858
matrix:
59-
Linux_Clang_Release:
59+
Linux_Clang_RelWithDebInfo:
6060
image: ${{ variables.linux }}
61-
configuration: Release
61+
configuration: RelWithDebInfo
6262
CC: clang-18
6363
CXX: clang++-18
64-
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_USE_SANITIZER='Address;Undefined' -DLLVM_ENABLE_LIBCXX=On -DLLVM_USE_LINKER=lld
65-
CHECK_ALL_ENV: ASAN_OPTIONS=alloc_dealloc_mismatch=0
64+
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_USE_SANITIZER='Address;Undefined' -DLLVM_ENABLE_LIBCXX=On -DLLVM_USE_LINKER=lld-18
65+
CHECK_ALL_ENV: ASAN_OPTIONS=alloc_dealloc_mismatch=0 LSAN_OPTIONS=suppressions=$BUILD_SOURCESDIRECTORY/utils/asan/x86_64-pc-linux-gnu.lsan.supp:print_suppressions=0 ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-18 LSAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-18
6666
OS: Linux
6767
Linux_Clang_Debug:
6868
image: ${{ variables.linux }}
@@ -107,6 +107,8 @@ stages:
107107
versionSpec: '3.x'
108108

109109
- bash: |
110+
sudo apt-get update
111+
sudo apt-get upgrade libc6 libc6-dbg
110112
sudo apt-get install ninja-build
111113
wget https://apt.llvm.org/llvm.sh
112114
chmod u+x llvm.sh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
leak:^call_init$

0 commit comments

Comments
 (0)