about summary refs log tree commit diff
path: root/qemu_mode/patches/tcg-runtime.diff
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-11 21:29:36 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-11 21:29:36 +0100
commite22ba031f552bf41fb24286b54c0417d5ddd464a (patch)
tree944e0878e5e90b7d2c4774f630e5f17c6a302648 /qemu_mode/patches/tcg-runtime.diff
parent1bb6e1911b4a983687de09b39072638c0c001d3e (diff)
downloadafl++-e22ba031f552bf41fb24286b54c0417d5ddd464a.tar.gz
AFL_ENTRYPOINT instruction granularity
Diffstat (limited to 'qemu_mode/patches/tcg-runtime.diff')
-rw-r--r--qemu_mode/patches/tcg-runtime.diff24
1 files changed, 24 insertions, 0 deletions
diff --git a/qemu_mode/patches/tcg-runtime.diff b/qemu_mode/patches/tcg-runtime.diff
new file mode 100644
index 00000000..54a62ba8
--- /dev/null
+++ b/qemu_mode/patches/tcg-runtime.diff
@@ -0,0 +1,24 @@
+diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c
+index d0d44844..46154af1 100644
+--- a/accel/tcg/tcg-runtime.c
++++ b/accel/tcg/tcg-runtime.c
+@@ -31,6 +31,8 @@
+ #include "disas/disas.h"
+ #include "exec/log.h"
+ 
++#include "../../../patches/afl-qemu-common.h"
++
+ /* 32-bit helpers */
+ 
+ int32_t HELPER(div_i32)(int32_t arg1, int32_t arg2)
+@@ -167,3 +169,10 @@ void HELPER(exit_atomic)(CPUArchState *env)
+ {
+     cpu_loop_exit_atomic(ENV_GET_CPU(env), GETPC());
+ }
++
++
++void HELPER(afl_entry_routine)(CPUArchState *env) {
++  
++  afl_forkserver(ENV_GET_CPU(env));
++  
++}