diff options
author | vanhauser-thc <vh@thc.org> | 2023-03-09 17:36:13 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2023-03-09 17:36:13 +0100 |
commit | 5221938945cc5ff15af04b727c6a7e0085005044 (patch) | |
tree | ffcb60f2dd0345633d1a934c7d207ed3d5a26809 /instrumentation/afl-compiler-rt.o.c | |
parent | dc7ef967d8dd4a338ddc72b41dcf8840437aabc2 (diff) | |
download | afl++-5221938945cc5ff15af04b727c6a7e0085005044.tar.gz |
various fixes
Diffstat (limited to 'instrumentation/afl-compiler-rt.o.c')
-rw-r--r-- | instrumentation/afl-compiler-rt.o.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index 94022a65..a88396d4 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -1622,17 +1622,23 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) { } - if (__afl_already_initialized_shm && __afl_final_loc > __afl_map_size) { + if (__afl_already_initialized_shm) { - if (__afl_debug) { + if (__afl_final_loc > __afl_map_size) { + + if (__afl_debug) { + + fprintf(stderr, "Reinit shm necessary (+%u)\n", + __afl_final_loc - __afl_map_size); + + } - fprintf(stderr, "Reinit shm necessary (+%u)\n", - __afl_final_loc - __afl_map_size); + __afl_unmap_shm(); + __afl_map_shm(); } - __afl_unmap_shm(); - __afl_map_shm(); + __afl_map_size = __afl_final_loc + 1; } |