about summary refs log tree commit diff
path: root/qemu_mode/patches/afl-qemu-tcg-runtime-inl.h
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-03-18 21:18:55 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-03-18 21:18:55 +0100
commit2e4fda6d4cc9ec40f81f5a72b874281efa714188 (patch)
tree28086df29c4c2e608d2c02cbef4422d929f3663e /qemu_mode/patches/afl-qemu-tcg-runtime-inl.h
parentcd7e234445c859eb0a88b75a0e3a8fb5b8d4b38e (diff)
downloadafl++-2e4fda6d4cc9ec40f81f5a72b874281efa714188.tar.gz
fix #261
Diffstat (limited to 'qemu_mode/patches/afl-qemu-tcg-runtime-inl.h')
-rw-r--r--qemu_mode/patches/afl-qemu-tcg-runtime-inl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/qemu_mode/patches/afl-qemu-tcg-runtime-inl.h b/qemu_mode/patches/afl-qemu-tcg-runtime-inl.h
index 52444c20..b7cd71bb 100644
--- a/qemu_mode/patches/afl-qemu-tcg-runtime-inl.h
+++ b/qemu_mode/patches/afl-qemu-tcg-runtime-inl.h
@@ -199,7 +199,12 @@ void HELPER(afl_cmplog_rtn)(CPUArchState *env) {
 
   if (!area_is_mapped(ptr1, 32) || !area_is_mapped(ptr2, 32)) return;
 
+#if defined(TARGET_X86_64) || defined(TARGET_I386)
   uintptr_t k = (uintptr_t)env->eip;
+#else
+  uintptr_t k = 0;
+#endif
+
   k = (k >> 4) ^ (k << 8);
   k &= CMP_MAP_W - 1;