From 68419e12e9038d852665fefde2da0836609993a0 Mon Sep 17 00:00:00 2001 From: agroce Date: Wed, 24 Apr 2019 12:35:42 -0700 Subject: [PATCH] fix abort on fail for asserts in DeepState harness --- src/lib/DeepState.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/DeepState.c b/src/lib/DeepState.c index 0e9536a..8500826 100644 --- a/src/lib/DeepState.c +++ b/src/lib/DeepState.c @@ -920,6 +920,9 @@ void __assert_fail(const char * assertion, const char * file, DeepState_LogFormat(DeepState_LogFatal, "%s(%u): Assertion %s failed in function %s", file, line, assertion, function); + if (FLAGS_abort_on_fail) { + assert(0); // Terminate the testing in a way AFL/etc. can see as a crash + } __builtin_unreachable(); }