5 logs="$GITHUB_WORKSPACE/sanitizer"
10 export ASAN_OPTIONS="log_path=$logs/asan:detect_invalid_pointer_pairs=2:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
14 export TSAN_OPTIONS="log_path=$logs/tsan"
18 export UBSAN_OPTIONS="log_path=$logs/ubsan:print_stacktrace=1"
22 echo >&2 "unknown sanitizer $SANITIZER"
27 sudo --preserve-env=ASAN_OPTIONS,TSAN_OPTIONS,UBSAN_OPTIONS \
30 # Check that the sanitizer has not created any log files.
31 # If it has, fail the job to notify the developer.
32 log_count=$(find "$logs" -type f -printf . | wc -c)
34 if [ "$log_count" != 0 ]; then
35 echo "expected zero sanitizer logs, found $log_count"