diff options
author | van Hauser <vh@thc.org> | 2020-06-06 11:45:08 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-06-06 11:45:08 +0200 |
commit | 372206e159f4f3d150543411872319fb8fae0b66 (patch) | |
tree | ca044eec884e61328a78371798c7172c74a62ff9 /examples/aflpp_driver/aflpp_driver.cpp | |
parent | c036108b59ffc98ff8515c94450a036c506b592c (diff) | |
download | afl++-372206e159f4f3d150543411872319fb8fae0b66.tar.gz |
aflpp_debug
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver.cpp')
-rw-r--r-- | examples/aflpp_driver/aflpp_driver.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/aflpp_driver/aflpp_driver.cpp b/examples/aflpp_driver/aflpp_driver.cpp index e0a90ff9..a60eb264 100644 --- a/examples/aflpp_driver/aflpp_driver.cpp +++ b/examples/aflpp_driver/aflpp_driver.cpp @@ -246,7 +246,8 @@ int main(int argc, char **argv) { LLVMFuzzerInitialize(&argc, &argv); // Do any other expensive one-time initialization here. - int N = 1000; + uint8_t dummy_input[1] = {0}; + int N = 100000; if (argc == 2 && argv[1][0] == '-') N = atoi(argv[1] + 1); else if(argc == 2 && (N = atoi(argv[1])) > 0) @@ -267,11 +268,13 @@ int main(int argc, char **argv) { // Call LLVMFuzzerTestOneInput here so that coverage caused by initialization // on the first execution of LLVMFuzzerTestOneInput is ignored. - uint8_t dummy_input[1] = {0}; LLVMFuzzerTestOneInput(dummy_input, 1); int num_runs = 0; while (__afl_persistent_loop(N)) { +#ifdef _DEBUG + fprintf(stderr, "len: %u\n", *__afl_fuzz_len); +#endif if (*__afl_fuzz_len) { num_runs++; LLVMFuzzerTestOneInput(__afl_fuzz_ptr, *__afl_fuzz_len); |