diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 0e1b3be8..4dc3763b 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -268,6 +268,16 @@ run_tests() { log "Skipping ASAN tests because compiler ($CC_VERSION) doesn't support ASAN" fi + cflags=("-fsanitize=cfi" "-fno-sanitize-recover=cfi" "-flto" + "-fvisibility=hidden") + if cflags_supported "${cflags[@]}"; then + begin "Running tests with CFI" + CFLAGS="$CFLAGS ${cflags[*]}" do_run_tests --quick + end + else + log "Skipping CFI tests because compiler ($CC_VERSION) doesn't support CFI" + fi + install_uninstall_tests check_symbol_prefixes }