diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2021-08-01 22:10:08 +0200 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-08-02 14:57:00 +0200 |
commit | 01a7ca8cc759a213620a46c9c570d894c206ba61 (patch) | |
tree | 286bf6124b9cd590a46b0d3ec66c4ce4a9d25b40 /driver | |
parent | d2f7d3ef281c69d676a73b9b9f7574b2d05a821e (diff) | |
download | jazzer-api-01a7ca8cc759a213620a46c9c570d894c206ba61.tar.gz |
Exit with correct exit code on macOS
Diffstat (limited to 'driver')
-rw-r--r-- | driver/libfuzzer_fuzz_target.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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"; } } |