From a9ea61c540f9075e9f6312d64548507239f05c52 Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Fri, 24 Nov 2023 17:54:18 +0100 Subject: [PATCH] fix: check enabled snapshot before logging also in range version of dirty_list. --- libafl_extras/syx-snapshot/syx-snapshot.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libafl_extras/syx-snapshot/syx-snapshot.c b/libafl_extras/syx-snapshot/syx-snapshot.c index 6dab92276f..89f9065d66 100644 --- a/libafl_extras/syx-snapshot/syx-snapshot.c +++ b/libafl_extras/syx-snapshot/syx-snapshot.c @@ -451,6 +451,11 @@ void syx_snapshot_dirty_list_add_hostaddr(void* host_addr) void syx_snapshot_dirty_list_add_hostaddr_range(void* host_addr, uint64_t len) { + // early check to know whether we should log the page access or not + if (!syx_snapshot_is_enabled()) { + return; + } + assert(len < INT64_MAX); int64_t len_signed = (int64_t) len;