diff options
Diffstat (limited to 'instrumentation/afl-compiler-rt.o.c')
-rw-r--r-- | instrumentation/afl-compiler-rt.o.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index 20f325f3..1b9fdee3 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -3,7 +3,7 @@ ------------------------------------------------ Copyright 2015, 2016 Google Inc. All rights reserved. - Copyright 2019-2020 AFLplusplus Project. All rights reserved. + Copyright 2019-2022 AFLplusplus Project. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1421,11 +1421,25 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) { // we have a problem as we cannot increase the coverage map anymore. if (__afl_already_initialized_forkserver) { - fprintf(stderr, - "[-] FATAL: forkserver is already up, but an instrumented dlopen() " - "library loaded afterwards. You must AFL_PRELOAD such libraries to " - "be able to fuzz them or LD_PRELOAD to run outside of afl-fuzz.\n"); - abort(); + if (!getenv("AFL_IGNORE_PROBLEMS")) { + + fprintf( + stderr, + "[-] FATAL: forkserver is already up, but an instrumented dlopen() " + "library loaded afterwards. You must AFL_PRELOAD such libraries to " + "be able to fuzz them or LD_PRELOAD to run outside of afl-fuzz.\n" + "To ignore this set AFL_IGNORE_PROBLEMS=1.\n"); + abort(); + + } else { + + while (start < stop) { + + *(start++) = 4; + + } + + } } @@ -1462,7 +1476,7 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) { if (R(100) < inst_ratio) *start = ++__afl_final_loc % __afl_map_size; else - *start = 0; + *start = 4; start++; @@ -1487,7 +1501,7 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) { if (R(100) < inst_ratio) *start = ++__afl_final_loc; else - *start = 0; + *start = 4; start++; |