diff options
author | van Hauser <vh@thc.org> | 2020-12-09 11:07:14 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-12-09 11:07:14 +0100 |
commit | 39a4fac941177387578ec856aacea2187588fc13 (patch) | |
tree | cef83df4ebfb797eb9f49066c0007a92baa4b035 /utils/persistent_mode/persistent_demo.c | |
parent | 2641082a76ca33e22f0edcededa006f437b646ea (diff) | |
download | afl++-39a4fac941177387578ec856aacea2187588fc13.tar.gz |
better examples
Diffstat (limited to 'utils/persistent_mode/persistent_demo.c')
-rw-r--r-- | utils/persistent_mode/persistent_demo.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/persistent_mode/persistent_demo.c b/utils/persistent_mode/persistent_demo.c index 4cedc32c..f5e43728 100644 --- a/utils/persistent_mode/persistent_demo.c +++ b/utils/persistent_mode/persistent_demo.c @@ -27,9 +27,15 @@ #include <unistd.h> #include <signal.h> #include <string.h> +#include <limits.h> /* Main entry point. */ +/* To ensure checks are not optimized out it is recommended to disable + code optimization for the fuzzer harness main() */ +#pragma clang optimize off +#pragma GCC optimize("O0") + int main(int argc, char **argv) { ssize_t len; /* how much input did we read? */ @@ -42,7 +48,7 @@ int main(int argc, char **argv) { and similar hiccups. */ __AFL_INIT(); - while (__AFL_LOOP(1000)) { + while (__AFL_LOOP(UINT_MAX)) { /*** PLACEHOLDER CODE ***/ |