Skip to content

Commit

Permalink
[CI] ASAN build on Linux (#14715)
Browse files Browse the repository at this point in the history
* [CI] ASAN build on Linux

#### Problem

Memory corruption is bad.

#### Change overview

Add a Linux build with Address Sanitizer.

Leak detection is explicitly disabled (which is the default on Darwin).

#### Testing

CI.

* fix stupid copy/paste

* only build tests, and add ubsan
  • Loading branch information
kpschoedel authored and pull[bot] committed Jul 31, 2023
1 parent 537b2bd commit 5fd61a2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,23 @@ jobs:
scripts/run_in_build_env.sh "ninja -C ./out"
scripts/tests/gn_tests.sh
done
- name: Run Tests with sanitizers
timeout-minutes: 30
env:
LSAN_OPTIONS: detect_leaks=0
run: |
# for BUILD_TYPE in asan msan tsan ubsan; do
for BUILD_TYPE in asan ubsan; do
case $BUILD_TYPE in
"asan") GN_ARGS='is_clang=true is_asan=true';;
"msan") GN_ARGS='is_clang=true is_msan=true';;
"tsan") GN_ARGS='is_clang=true is_tsan=true';;
"ubsan") GN_ARGS='is_clang=true is_ubsan=true';;
esac
scripts/build/gn_gen.sh --args="$GN_ARGS"
scripts/tests/gn_tests.sh
done
- name: Build using build_examples.py
timeout-minutes: 40
run: |
Expand Down

0 comments on commit 5fd61a2

Please sign in to comment.