diff --git a/src/include/deepstate/DeepState.h b/src/include/deepstate/DeepState.h index c6d5d83..227cb17 100644 --- a/src/include/deepstate/DeepState.h +++ b/src/include/deepstate/DeepState.h @@ -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++; diff --git a/src/lib/DeepState.c b/src/lib/DeepState.c index 48c0c3d..a62395a 100644 --- a/src/lib/DeepState.c +++ b/src/lib/DeepState.c @@ -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 } }