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/test-instr.c | |
parent | 2641082a76ca33e22f0edcededa006f437b646ea (diff) | |
download | afl++-39a4fac941177387578ec856aacea2187588fc13.tar.gz |
better examples
Diffstat (limited to 'utils/persistent_mode/test-instr.c')
-rw-r--r-- | utils/persistent_mode/test-instr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/persistent_mode/test-instr.c b/utils/persistent_mode/test-instr.c index a6188b22..6da511de 100644 --- a/utils/persistent_mode/test-instr.c +++ b/utils/persistent_mode/test-instr.c @@ -17,15 +17,21 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <limits.h> __AFL_FUZZ_INIT(); +/* 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) { __AFL_INIT(); unsigned char *buf = __AFL_FUZZ_TESTCASE_BUF; - while (__AFL_LOOP(2147483647)) { // MAX_INT if you have 100% stability + while (__AFL_LOOP(UINT_MAX)) { // if you have 100% stability unsigned int len = __AFL_FUZZ_TESTCASE_LEN; |