diff --git a/src/lib/DeepState.c b/src/lib/DeepState.c index 26c9fee..91bbfc4 100644 --- a/src/lib/DeepState.c +++ b/src/lib/DeepState.c @@ -601,6 +601,13 @@ extern int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { enum DeepState_TestRunResult result = DeepState_RunTestLLVM(test); + const char* abort_check = getenv("LIBFUZZER_ABORT_ON_FAIL"); + if (abort_check != NULL) { + if ((result == DeepState_TestRunFail) || (result == DeepState_TestRunCrash)) { + abort(); + } + } + DeepState_Teardown(); DeepState_CurrentTestRun = NULL; free(mem);