Skip to content

Commit ea4aca9

Browse files
authored
Enable asan on our Linux Release pipeline (microsoft#5799)
Address sanitizer can detect all sorts of memory usage related bugs. Things like overflows, underflows, use-after-free, and (on Linux) leaks. Due to the great work by @amaiorano, DXC is now asan-clean in our test suite. Enabling this in our PR builds will allow us to stay that way. I've chosen the Linux builds because the Linux runtime hooks capture more errors than on other platforms. It only runs in the Release configuration because asan can have significant runtime overhead so running it in a release configuration will mitigate that substantially. I've also changed the build to use libc++ instead of libstdc++ because the libc++ headers have additional address sanitizer annotations to catch misuses of C++ standard library containers.
1 parent 9419b9b commit ea4aca9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ stages:
5353
configuration: Release
5454
CC: clang
5555
CXX: clang++
56-
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On
56+
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_ENABLE_SANITIZER=Address -DLLVM_ENABLE_LIBCXX=On
5757
OS: Linux
5858
Linux_Clang_Debug:
5959
image: ${{ variables.linux }}

0 commit comments

Comments
 (0)