about summary refs log tree commit diff
path: root/qemu_mode/patches/afl-qemu-common.h
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2019-10-02 21:20:41 +0200
committerAndrea Fioraldi <andreafioraldi@gmail.com>2019-10-02 21:20:41 +0200
commit6b3a9b9dc00c495f082f5800c38f462c8fefd682 (patch)
tree23de51167e9741ce84f1481a3f9a672a8cb190c8 /qemu_mode/patches/afl-qemu-common.h
parent973b0ac4889af3be7e9966ef49374b6ede34b199 (diff)
downloadafl++-6b3a9b9dc00c495f082f5800c38f462c8fefd682.tar.gz
arm compcov draft
Diffstat (limited to 'qemu_mode/patches/afl-qemu-common.h')
-rw-r--r--qemu_mode/patches/afl-qemu-common.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/qemu_mode/patches/afl-qemu-common.h b/qemu_mode/patches/afl-qemu-common.h
index e435c62f..c86b5b45 100644
--- a/qemu_mode/patches/afl-qemu-common.h
+++ b/qemu_mode/patches/afl-qemu-common.h
@@ -33,6 +33,12 @@
 
 #include "../../config.h"
 
+#ifndef CPU_NB_REGS
+#define AFL_REGS_NUM 1000
+#else
+#define AFL_REGS_NUM CPU_NB_REGS
+#endif
+
 /* NeverZero */
 
 #if (defined(__x86_64__) || defined(__i386__)) && defined(AFL_QEMU_NOT_ZERO)
@@ -60,7 +66,7 @@ extern unsigned char  is_persistent;
 extern target_long    persistent_stack_offset;
 extern unsigned char  persistent_first_pass;
 extern unsigned char  persistent_save_gpr;
-extern target_ulong   persistent_saved_gpr[CPU_NB_REGS];
+extern target_ulong   persistent_saved_gpr[AFL_REGS_NUM];
 extern int            persisent_retaddr_offset;
 
 extern __thread abi_ulong afl_prev_loc;