aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-03-10 10:04:45 +0100
committervanhauser-thc <vh@thc.org>2021-03-10 10:04:45 +0100
commitb2feada293b64f6148917399e728c9b19799edf9 (patch)
treee96596d4c7e0a813ed3a4829cc47c9e9fc0ad655
parentbff02dae0d344cb51222b75840cc7f1a31ab03eb (diff)
downloadafl++-b2feada293b64f6148917399e728c9b19799edf9.tar.gz
rt debug
-rw-r--r--instrumentation/afl-compiler-rt.o.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c
index 74db7089..7fd982ce 100644
--- a/instrumentation/afl-compiler-rt.o.c
+++ b/instrumentation/afl-compiler-rt.o.c
@@ -317,16 +317,18 @@ static void __afl_map_shm(void) {
if (__afl_debug)
fprintf(stderr,
- "DEBUG: id_str %s, __afl_area_ptr %p, __afl_area_initial %p, "
- "__afl_map_addr 0x%llx, MAP_SIZE %u, __afl_final_loc %u, "
+ "DEBUG: (1) id_str %s, __afl_area_ptr %p, __afl_area_initial %p, "
+ "__afl_area_ptr_dummy 0x%llx, __afl_map_addr 0x%llx, MAP_SIZE %u, "
+ "__afl_final_loc %u, "
"max_size_forkserver %u/0x%x\n",
id_str == NULL ? "<null>" : id_str, __afl_area_ptr,
- __afl_area_initial, __afl_map_addr, MAP_SIZE, __afl_final_loc,
- FS_OPT_MAX_MAPSIZE, FS_OPT_MAX_MAPSIZE);
+ __afl_area_initial, __afl_area_ptr_dummy, __afl_map_addr, MAP_SIZE,
+ __afl_final_loc, FS_OPT_MAX_MAPSIZE, FS_OPT_MAX_MAPSIZE);
if (id_str) {
- if (__afl_area_ptr && __afl_area_ptr != __afl_area_initial) {
+ if (__afl_area_ptr && __afl_area_ptr != __afl_area_initial &&
+ __afl_area_ptr != __afl_area_ptr_dummy) {
if (__afl_map_addr) {
@@ -457,6 +459,17 @@ static void __afl_map_shm(void) {
if (!__afl_area_ptr) { __afl_area_ptr = __afl_area_ptr_dummy; }
+ if (__afl_debug)
+ fprintf(stderr,
+ "DEBUG: (2) id_str %s, __afl_area_ptr %p, __afl_area_initial %p, "
+ "__afl_area_ptr_dummy 0x%llx, __afl_map_addr 0x%llx, MAP_SIZE "
+ "%u, __afl_final_loc %u, "
+ "max_size_forkserver %u/0x%x\n",
+ id_str == NULL ? "<null>" : id_str, __afl_area_ptr,
+ __afl_area_initial, __afl_area_ptr_dummy, __afl_map_addr,
+ MAP_SIZE, __afl_final_loc, FS_OPT_MAX_MAPSIZE,
+ FS_OPT_MAX_MAPSIZE);
+
}
__afl_area_ptr_backup = __afl_area_ptr;