diff options
author | vanhauser-thc <vh@thc.org> | 2022-01-12 21:59:31 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2022-01-12 21:59:38 +0100 |
commit | 21ebfec79c75f99c938ebfc453e76eb82328d12e (patch) | |
tree | 1b49dccecccbe088377810794647f3b8d4687d1d /instrumentation | |
parent | 8701cdcc2ce3d455b88585fd26f54161ed4a3bc4 (diff) | |
download | afl++-21ebfec79c75f99c938ebfc453e76eb82328d12e.tar.gz |
better ignore problem handling
Diffstat (limited to 'instrumentation')
-rw-r--r-- | instrumentation/afl-compiler-rt.o.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index 1b9fdee3..a84f31e3 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -1433,9 +1433,12 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) { } else { + static u32 offset = 4; + while (start < stop) { - *(start++) = 4; + *(start++) = offset; + if (unlikely(++offset >= __afl_final_loc)) { offset = 4; } } @@ -1444,7 +1447,7 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) { } x = getenv("AFL_INST_RATIO"); - if (x) inst_ratio = (u32)atoi(x); + if (x) { inst_ratio = (u32)atoi(x); } if (!inst_ratio || inst_ratio > 100) { |