Correctly set ASAN/UBSAN/LSAN options for CI

These are NOT build-time defines but rather run-time environment variables! They
have never had any effect and we have effectively never used them to affect
sanitizer behavior under CI with ASAN/UBSAN/LSAN enabled.

(I caught this because the tests don't pass with either of LSAN_OPTIONS
`verbosity=1` or `log_threads=1` because they inject text into the stderr
output, ensuring they never pass littlecheck.)
This commit is contained in:
Mahmoud Al-Qudsi 2022-10-24 15:00:09 -05:00
parent 63a2fdd773
commit de62091b03

View File

@ -76,9 +76,6 @@ jobs:
CC: clang
CXX: clang++
CXXFLAGS: "-fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address"
ASAN_OPTIONS: check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1
UBSAN_OPTIONS: print_stacktrace=1:report_error_type=1
LSAN_OPTIONS: verbosity=1:log_threads=1
run: |
mkdir build && cd build
cmake ..
@ -86,6 +83,10 @@ jobs:
run: |
make
- name: make test
env:
ASAN_OPTIONS: check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1
UBSAN_OPTIONS: print_stacktrace=1:report_error_type=1
LSAN_OPTIONS: verbosity=1:log_threads=1
run: |
make test