#include <boost/program_options.hpp>
#include "include_base_utils.h"
#include "string_tools.h"
#include "common/command_line.h"
#include "common/util.h"
#include "fuzzer.h"
Go to the source code of this file.
◆ run_fuzzer()
| int run_fuzzer |
( |
int | argc, |
|
|
const char ** | argv, |
|
|
Fuzzer & | fuzzer ) |
Definition at line 48 of file fuzzer.cpp.
49{
51
52 if (argc < 2)
53 {
54 std::cout << "usage: " << argv[0] << " " << "<filename>" << std::endl;
55 return 1;
56 }
57
58#ifdef __AFL_HAVE_MANUAL_CONTROL
59 __AFL_INIT();
60#endif
61
62 int ret = fuzzer.
init();
63 if (ret)
64 return ret;
65
66 const std::string filename = argv[1];
67 while (__AFL_LOOP(1000))
68 {
69 ret = fuzzer.
run(filename);
70 if (ret)
71 return ret;
72 }
73
74 return 0;
75
77}
virtual int run(const std::string &filename)=0
#define CATCH_ENTRY_L0(lacation, return_val)