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/translator.diff | |
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/translator.diff')
-rw-r--r-- | qemu_mode/patches/translator.diff | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/qemu_mode/patches/translator.diff b/qemu_mode/patches/translator.diff new file mode 100644 index 00000000..842e861d --- /dev/null +++ b/qemu_mode/patches/translator.diff @@ -0,0 +1,25 @@ +diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c +index afd0a49e..773ea712 100644 +--- a/accel/tcg/translator.c ++++ b/accel/tcg/translator.c +@@ -18,6 +18,8 @@ + #include "exec/log.h" + #include "exec/translator.h" + ++#include "../../../patches/afl-qemu-common.h" ++ + /* Pairs with tcg_clear_temp_count. + To be called by #TranslatorOps.{translate_insn,tb_stop} if + (1) the target is sufficiently clean to support reporting, +@@ -92,6 +94,11 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db, + break; + } + } ++ ++ if (db->pc_next == afl_entry_point) { ++ afl_setup(); ++ gen_helper_afl_entry_routine(cpu_env); ++ } + + /* Disassemble one instruction. The translate_insn hook should + update db->pc_next and db->is_jmp to indicate what should be |