Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Unified Diff: third_party/afl/src/qemu_mode/patches/cpu-exec.diff

Issue 2075883002: Add American Fuzzy Lop (afl) to third_party/afl/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/afl/src/qemu_mode/patches/cpu-exec.diff
diff --git a/third_party/afl/src/qemu_mode/patches/cpu-exec.diff b/third_party/afl/src/qemu_mode/patches/cpu-exec.diff
new file mode 100644
index 0000000000000000000000000000000000000000..f7085cd253d3198517982fdb513655de971d81ed
--- /dev/null
+++ b/third_party/afl/src/qemu_mode/patches/cpu-exec.diff
@@ -0,0 +1,33 @@
+--- qemu-2.3.0/cpu-exec.c.orig 2014-12-09 14:45:40.000000000 +0000
++++ qemu-2.3.0/cpu-exec.c 2015-02-20 22:07:02.966000000 +0000
+@@ -28,6 +28,8 @@
+ #include "exec/memory-internal.h"
+ #include "qemu/rcu.h"
+
++#include "../patches/afl-qemu-cpu-inl.h"
++
+ /* -icount align implementation. */
+
+ typedef struct SyncClocks {
+@@ -296,8 +298,11 @@
+ }
+ not_found:
+ /* if no translated code available, then translate it now */
++
+ tb = tb_gen_code(cpu, pc, cs_base, flags, 0);
+
++ AFL_QEMU_CPU_SNIPPET1;
++
+ found:
+ /* Move the last found TB to the head of the list */
+ if (likely(*ptb1)) {
+@@ -492,6 +497,9 @@
+ next_tb = 0;
+ tcg_ctx.tb_ctx.tb_invalidated_flag = 0;
+ }
++
++ AFL_QEMU_CPU_SNIPPET2;
++
+ if (qemu_loglevel_mask(CPU_LOG_EXEC)) {
+ qemu_log("Trace %p [" TARGET_FMT_lx "] %s\n",
+ tb->tc_ptr, tb->pc, lookup_symbol(tb->pc));
« no previous file with comments | « third_party/afl/src/qemu_mode/patches/afl-qemu-cpu-inl.h ('k') | third_party/afl/src/qemu_mode/patches/elfload.diff » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698