Skip to content

Commit 07c350a

Browse files
committed
CI: set ASAN and UBSAN setting globally
1 parent 8bb8d54 commit 07c350a

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/linux.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,23 @@ jobs:
117117
CXXFLAGS="-fdiagnostics-color $CXXFLAGS"
118118
fi
119119
120+
# Due to LD_PRELOAD above, leak sanitizer was reporting leaks
121+
# literally in everything that was executed, e.g. make, shell,
122+
# python and other tools that are not under our control.
123+
ASAN_OPTIONS=detect_leaks=0
124+
125+
# Make UBSAN print whole stack traces
126+
UBSAN_OPTIONS="print_stacktrace=1"
127+
120128
# Save the environment
121129
echo "CC=$CC" >> $GITHUB_ENV
122130
echo "CXX=$CXX" >> $GITHUB_ENV
123131
echo "CFLAGS=$CFLAGS" >> $GITHUB_ENV
124132
echo "CXXFLAGS=$CXXFLAGS" >> $GITHUB_ENV
125133
echo "LDFLAGS=$LDFLAGS" >> $GITHUB_ENV
126134
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
135+
echo "ASAN_OPTIONS=$ASAN_OPTIONS" >> "$GITHUB_ENV"
136+
echo "UBSAN_OPTIONS=$UBSAN_OPTIONS" >> "$GITHUB_ENV"
127137
128138
# Set up ccache
129139
sudo /usr/sbin/update-ccache-symlinks
@@ -172,10 +182,7 @@ jobs:
172182
# in PATH.
173183
export PATH="$(llvm-config-${{matrix.llvm}} --bindir):$PATH"
174184
175-
# Due to LD_PRELOAD above, leak sanitizer was reporting leaks
176-
# literally in everything that was executed, e.g. make, shell,
177-
# python and other tools that are not under our control.
178-
ASAN_OPTIONS=detect_leaks=0 make -C tests
185+
make -C tests
179186
180187
- name: ccache statistics
181188
run: ccache -s

0 commit comments

Comments
 (0)