aboutsummaryrefslogtreecommitdiff
path: root/tests/fuzz/fuzzer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fuzz/fuzzer.cpp')
-rw-r--r--tests/fuzz/fuzzer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/fuzz/fuzzer.cpp b/tests/fuzz/fuzzer.cpp
index b81bf80fe..ab14e2b79 100644
--- a/tests/fuzz/fuzzer.cpp
+++ b/tests/fuzz/fuzzer.cpp
@@ -46,12 +46,18 @@ static int __AFL_LOOP(int)
int run_fuzzer(int argc, const char **argv, Fuzzer &fuzzer)
{
+ TRY_ENTRY();
+
if (argc < 2)
{
std::cout << "usage: " << argv[0] << " " << "<filename>" << std::endl;
return 1;
}
+#ifdef __AFL_HAVE_MANUAL_CONTROL
+ __AFL_INIT();
+#endif
+
int ret = fuzzer.init();
if (ret)
return ret;
@@ -65,4 +71,6 @@ int run_fuzzer(int argc, const char **argv, Fuzzer &fuzzer)
}
return 0;
+
+ CATCH_ENTRY_L0("run_fuzzer", 1);
}