Skip to content

Commit

Permalink
ci: Put ASAN CFLAGS in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy committed Jan 11, 2025
1 parent 708e30d commit b7075e5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ jobs:
os: ubuntu-22.04
build_system: meson
compiler: gcc-12
cflags: "-DRZ_ASSERT_STDOUT=1 -ftrivial-auto-var-init=pattern -funsigned-char"
cflags: "-DASAN=1 -DRZ_ASSERT_STDOUT=1 -ftrivial-auto-var-init=pattern -funsigned-char"
meson_options: -Dbuildtype=debugoptimized -Db_sanitize=address,undefined --werror
asan: true
asan_options: "detect_leaks=0,detect_odr_violation=0,allocator_may_return_null=1"
asan_options: detect_leaks=0,detect_odr_violation=0,allocator_may_return_null=1
run_tests: true
enabled: ${{ needs.changes.outputs.edited == 'true' }}
timeout: 120
Expand All @@ -110,10 +110,10 @@ jobs:
os: ubuntu-22.04
build_system: meson
compiler: clang
cflags: -DRZ_ASSERT_STDOUT=1
cflags: "-DASAN=1 -DRZ_ASSERT_STDOUT=1"
meson_options: -Dbuildtype=debugoptimized -Db_lundef=false -Db_sanitize=address,undefined --werror
asan: true
asan_options: "detect_leaks=0,detect_odr_violation=0,allocator_may_return_null=1"
asan_options: detect_leaks=0,detect_odr_violation=0,allocator_may_return_null=1
run_tests: true
enabled: ${{ needs.changes.outputs.edited == 'true' }}
timeout: 115
Expand Down Expand Up @@ -209,7 +209,6 @@ jobs:
if [ "$ASAN" == "true" ]; then
# Work-around ASAN bug https://github.com/google/sanitizers/issues/1716
sudo sysctl vm.mmap_rnd_bits=28
export CFLAGS="-DASAN=1 ${CFLAGS}"
if [ "$CC" == "clang" ]; then
export LD_LIBRARY_PATH=$(dirname $(clang -print-file-name=libclang_rt.asan-x86_64.so)):${LD_LIBRARY_PATH}
fi
Expand Down

0 comments on commit b7075e5

Please sign in to comment.