diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2019-11-27 17:02:43 +0100 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2019-11-27 17:02:43 +0100 |
commit | b2896c79c6ded54234a4a409f82d7cf893d23305 (patch) | |
tree | 656d53de5198316f416a0f29281e3018dec57fbc | |
parent | 8c0d247126803cc255b0898969f54b7c635dbcac (diff) | |
download | afl++-b2896c79c6ded54234a4a409f82d7cf893d23305.tar.gz |
env var to disable qemu caching
-rw-r--r-- | qemu_mode/patches/afl-qemu-cpu-inl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qemu_mode/patches/afl-qemu-cpu-inl.h b/qemu_mode/patches/afl-qemu-cpu-inl.h index f4c474d8..7c6d3341 100644 --- a/qemu_mode/patches/afl-qemu-cpu-inl.h +++ b/qemu_mode/patches/afl-qemu-cpu-inl.h @@ -84,6 +84,8 @@ __thread abi_ulong afl_prev_loc; /* Set in the child process in forkserver mode: */ static int forkserver_installed = 0; +static int disable_caching = 0; + unsigned char afl_fork_child; unsigned int afl_forksrv_pid; unsigned char is_persistent; @@ -205,6 +207,8 @@ static void afl_setup(void) { behaviour, and seems to work alright? */ rcu_disable_atfork(); + + disable_caching = getenv("AFL_QEMU_DISABLE_CACHE") != NULL; is_persistent = getenv("AFL_QEMU_PERSISTENT_ADDR") != NULL; @@ -422,6 +426,8 @@ static void afl_request_tsl(target_ulong pc, target_ulong cb, uint32_t flags, uint32_t cf_mask, TranslationBlock *last_tb, int tb_exit) { + if (disable_caching) return; + struct afl_tsl t; struct afl_chain c; |