diff options
Diffstat (limited to 'frida_mode/src/instrument')
-rw-r--r-- | frida_mode/src/instrument/instrument.c | 8 | ||||
-rw-r--r-- | frida_mode/src/instrument/instrument_coverage.c | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/frida_mode/src/instrument/instrument.c b/frida_mode/src/instrument/instrument.c index e37c1d29..9e4dd191 100644 --- a/frida_mode/src/instrument/instrument.c +++ b/frida_mode/src/instrument/instrument.c @@ -164,7 +164,7 @@ static void instrument_basic_block(GumStalkerIterator *iterator, * our AFL_ENTRYPOINT, since it is not until then that we start the * fork-server and thus start executing in the child. */ - excluded = range_is_excluded(GSIZE_TO_POINTER(instr->address)); + excluded = range_is_excluded(GUM_ADDRESS(instr->address)); stats_collect(instr, begin); @@ -173,11 +173,7 @@ static void instrument_basic_block(GumStalkerIterator *iterator, instrument_debug_start(instr->address, output); instrument_coverage_start(instr->address); - if (likely(entry_reached)) { - - prefetch_write(GSIZE_TO_POINTER(instr->address)); - - } + prefetch_write(GSIZE_TO_POINTER(instr->address)); if (likely(!excluded)) { diff --git a/frida_mode/src/instrument/instrument_coverage.c b/frida_mode/src/instrument/instrument_coverage.c index 9d1701d1..4c0d1a14 100644 --- a/frida_mode/src/instrument/instrument_coverage.c +++ b/frida_mode/src/instrument/instrument_coverage.c @@ -1,3 +1,4 @@ +#include <errno.h> #include <fcntl.h> #include <limits.h> #include <unistd.h> @@ -277,8 +278,6 @@ static void instrument_coverage_run() { if (bytes != 0) { FATAL("Coverage data truncated"); } - if (errno != ENOENT) { FATAL("Coverage I/O error"); } - OKF("Coverage - Preparing"); coverage_get_ranges(); @@ -325,7 +324,7 @@ void instrument_coverage_init(void) { g_free(path); - if (pipe2(coverage_pipes, O_DIRECT) != 0) { FATAL("Failed to create pipes"); } + if (pipe(coverage_pipes) != 0) { FATAL("Failed to create pipes"); } coverage_hash = g_hash_table_new(g_direct_hash, g_direct_equal); if (coverage_hash == NULL) { |