about summary refs log tree commit diff
path: root/qemu_mode/patches/cpu-exec.diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-11-06 09:37:14 +0100
committerGitHub <noreply@github.com>2020-11-06 09:37:14 +0100
commit3b799c09cd68bb68b26784261f1fbaa3e737c747 (patch)
treee581c3689d5fe231678464bb6bd48cab75c7db41 /qemu_mode/patches/cpu-exec.diff
parent5ee63a6e6267e448342ccb28cc8d3c0d34ffc1cd (diff)
parent50c98445fe74b92d2e6ab784def3e8b26a662b36 (diff)
downloadafl++-3b799c09cd68bb68b26784261f1fbaa3e737c747.tar.gz
Merge pull request #594 from AFLplusplus/dev
push to stable
Diffstat (limited to 'qemu_mode/patches/cpu-exec.diff')
-rw-r--r--qemu_mode/patches/cpu-exec.diff38
1 files changed, 0 insertions, 38 deletions
diff --git a/qemu_mode/patches/cpu-exec.diff b/qemu_mode/patches/cpu-exec.diff
deleted file mode 100644
index 844be58c..00000000
--- a/qemu_mode/patches/cpu-exec.diff
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
-index 870027d4..0bc87dfc 100644
---- a/accel/tcg/cpu-exec.c
-+++ b/accel/tcg/cpu-exec.c
-@@ -36,6 +36,8 @@
- #include "sysemu/cpus.h"
- #include "sysemu/replay.h"
- 
-+#include "../patches/afl-qemu-cpu-inl.h"
-+
- /* -icount align implementation. */
- 
- typedef struct SyncClocks {
-@@ -397,11 +399,13 @@ static inline TranslationBlock *tb_find(CPUState *cpu,
-     TranslationBlock *tb;
-     target_ulong cs_base, pc;
-     uint32_t flags;
-+    bool was_translated = false, was_chained = false;
- 
-     tb = tb_lookup__cpu_state(cpu, &pc, &cs_base, &flags, cf_mask);
-     if (tb == NULL) {
-         mmap_lock();
-         tb = tb_gen_code(cpu, pc, cs_base, flags, cf_mask);
-+        was_translated = true;
-         mmap_unlock();
-         /* We add the TB in the virtual pc hash table for the fast lookup */
-         atomic_set(&cpu->tb_jmp_cache[tb_jmp_cache_hash_func(pc)], tb);
-@@ -418,6 +422,10 @@ static inline TranslationBlock *tb_find(CPUState *cpu,
-     /* See if we can patch the calling TB. */
-     if (last_tb) {
-         tb_add_jump(last_tb, tb_exit, tb);
-+        was_chained = true;
-+    }
-+    if (was_translated || was_chained) {
-+        afl_request_tsl(pc, cs_base, flags, cf_mask, was_chained ? last_tb : NULL, tb_exit);
-     }
-     return tb;
- }