Fix the mac OS abort problem with libFuzzer

This commit is contained in:
Alex Groce
2019-01-03 15:02:59 -07:00
parent ca400bc2a0
commit 91b8b5b8d1
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -724,7 +724,7 @@ static int DeepState_RunSingleSavedTestCase(void) {
if ((result == DeepState_TestRunFail) || (result == DeepState_TestRunCrash)) {
if (FLAGS_abort_on_fail) {
abort();
assert(0); // Terminate in a way AFL/etc. can see as a crash
}
num_failed_tests++;
}
@@ -790,7 +790,7 @@ static int DeepState_RunSingleSavedTestDir(void) {
if ((result == DeepState_TestRunFail) || (result == DeepState_TestRunCrash)) {
if (FLAGS_abort_on_fail) {
abort();
assert(0); // Terminate in a way AFL/etc. can see as a crash
}
num_failed_tests++;
+2 -2
View File
@@ -741,7 +741,7 @@ enum DeepState_TestRunResult DeepState_FuzzOneTestCase(struct DeepState_TestInfo
if (FLAGS_abort_on_fail && ((result == DeepState_TestRunCrash) ||
(result == DeepState_TestRunFail))) {
abort();
assert(0); // Terminate the testing in a way AFL/etc. can see as a crash
}
return result;
@@ -783,7 +783,7 @@ extern int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
const char* abort_check = getenv("LIBFUZZER_ABORT_ON_FAIL");
if (abort_check != NULL) {
if ((result == DeepState_TestRunFail) || (result == DeepState_TestRunCrash)) {
abort();
assert(0); // Terminate the testing more permanently
}
}