From 01a7ca8cc759a213620a46c9c570d894c206ba61 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Sun, 1 Aug 2021 22:10:08 +0200 Subject: Exit with correct exit code on macOS --- driver/libfuzzer_fuzz_target.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'driver') diff --git a/driver/libfuzzer_fuzz_target.cpp b/driver/libfuzzer_fuzz_target.cpp index c2003d02..d258e519 100644 --- a/driver/libfuzzer_fuzz_target.cpp +++ b/driver/libfuzzer_fuzz_target.cpp @@ -26,12 +26,16 @@ const char *__asan_default_options() { // LeakSanitizer is not yet supported as it reports too many false positives // due to how the JVM GC works. // We use a distinguished exit code to recognize ASan crashes in tests. - return "detect_leaks=0,exitcode=76"; + // Also specify abort_on_error=0 explicitly since ASan aborts rather than + // exits on macOS by default, which would cause our exit code to be ignored. + return "abort_on_error=0,detect_leaks=0,exitcode=76"; } const char *__ubsan_default_options() { // We use a distinguished exit code to recognize UBSan crashes in tests. - return "exitcode=76"; + // Also specify abort_on_error=0 explicitly since UBSan aborts rather than + // exits on macOS by default, which would cause our exit code to be ignored. + return "abort_on_error=0,exitcode=76"; } } -- cgit v1.2.3