aboutsummaryrefslogtreecommitdiff
path: root/frida_mode/src
diff options
context:
space:
mode:
Diffstat (limited to 'frida_mode/src')
-rw-r--r--frida_mode/src/cmplog/cmplog.c4
-rw-r--r--frida_mode/src/entry.c2
-rw-r--r--frida_mode/src/instrument/instrument.c4
3 files changed, 6 insertions, 4 deletions
diff --git a/frida_mode/src/cmplog/cmplog.c b/frida_mode/src/cmplog/cmplog.c
index a2609c8e..ae3116eb 100644
--- a/frida_mode/src/cmplog/cmplog.c
+++ b/frida_mode/src/cmplog/cmplog.c
@@ -56,7 +56,9 @@ void cmplog_config(void) {
void cmplog_init(void) {
- if (__afl_cmp_map != NULL) { OKF("CMPLOG mode enabled"); }
+ OKF("CMPLOG - Enabled [%c]", __afl_cmp_map == NULL ? ' ' : 'X');
+
+ if (__afl_cmp_map == NULL) { return; }
cmplog_get_ranges();
diff --git a/frida_mode/src/entry.c b/frida_mode/src/entry.c
index a0ffd028..0b5f61ec 100644
--- a/frida_mode/src/entry.c
+++ b/frida_mode/src/entry.c
@@ -21,6 +21,7 @@ static void entry_launch(void) {
__afl_manual_init();
/* Child here */
+ entry_reached = TRUE;
instrument_on_fork();
stats_on_fork();
@@ -59,7 +60,6 @@ void entry_prologue(GumStalkerIterator *iterator, GumStalkerOutput *output) {
if (persistent_start == 0) {
- entry_reached = TRUE;
ranges_exclude();
stalker_trust();
diff --git a/frida_mode/src/instrument/instrument.c b/frida_mode/src/instrument/instrument.c
index 67aafa5a..fddff19a 100644
--- a/frida_mode/src/instrument/instrument.c
+++ b/frida_mode/src/instrument/instrument.c
@@ -116,8 +116,8 @@ __attribute__((hot)) static void on_basic_block(GumCpuContext *context,
}
- instrument_previous_pc =
- ((current_pc & (MAP_SIZE - 1) >> 1)) | ((current_pc & 0x1) << 15);
+ instrument_previous_pc = ((current_pc & (MAP_SIZE - 1) >> 1)) |
+ ((current_pc & 0x1) << (MAP_SIZE_POW2 - 1));
}