diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-02-12 12:00:38 +0100 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-02-12 12:00:38 +0100 |
commit | 5a114fd840305dff0692ccfb3c3aca0475f9ca8f (patch) | |
tree | edb9483260e6858617cb90bab1e3c5fd952cff8d /qemu_mode/patches/afl-qemu-cpu-inl.h | |
parent | 9db58da8b7be0f47209cba3b2d49247e3f1e13cf (diff) | |
parent | 54bbddec602feef0bd4e3bdc066c50779825d178 (diff) | |
download | afl++-5a114fd840305dff0692ccfb3c3aca0475f9ca8f.tar.gz |
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'qemu_mode/patches/afl-qemu-cpu-inl.h')
-rw-r--r-- | qemu_mode/patches/afl-qemu-cpu-inl.h | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/qemu_mode/patches/afl-qemu-cpu-inl.h b/qemu_mode/patches/afl-qemu-cpu-inl.h index 5e155c74..28fa1ab6 100644 --- a/qemu_mode/patches/afl-qemu-cpu-inl.h +++ b/qemu_mode/patches/afl-qemu-cpu-inl.h @@ -42,22 +42,6 @@ * VARIOUS AUXILIARY STUFF * ***************************/ -/* This snippet kicks in when the instruction pointer is positioned at - _start and does the usual forkserver stuff, not very different from - regular instrumentation injected via afl-as.h. */ - -#define AFL_QEMU_CPU_SNIPPET2 \ - do { \ - \ - if (itb->pc == afl_entry_point) { \ - \ - afl_setup(); \ - afl_forkserver(cpu); \ - \ - } \ - \ - } while (0) - /* We use one additional file descriptor to relay "needs translation" messages between the child and the fork server. */ @@ -107,9 +91,6 @@ unsigned int afl_inst_rms = MAP_SIZE; /* Exported for afl_gen_trace */ /* Function declarations. */ -static void afl_setup(void); -static void afl_forkserver(CPUState *); - static void afl_wait_tsl(CPUState *, int); static void afl_request_tsl(target_ulong, target_ulong, uint32_t, uint32_t, TranslationBlock *, int); @@ -155,7 +136,7 @@ static inline void tb_add_jump(TranslationBlock *tb, int n, /* Set up SHM region and initialize other stuff. */ -static void afl_setup(void) { +void afl_setup(void) { char *id_str = getenv(SHM_ENV_VAR), *inst_r = getenv("AFL_INST_RATIO"); @@ -310,7 +291,7 @@ static void print_mappings(void) { /* Fork server logic, invoked once we hit _start. */ -static void afl_forkserver(CPUState *cpu) { +void afl_forkserver(CPUState *cpu) { static unsigned char tmp[4]; |