about summary refs log tree commit diff
path: root/src/afl-tmin.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-17 15:05:14 +0200
committerGitHub <noreply@github.com>2020-06-17 15:05:14 +0200
commit0dc9967984df3f9c250d4c27b6de1cbd4cac3eb3 (patch)
treeca6096f1d22ba87c262bdeaf57455520ef3143e2 /src/afl-tmin.c
parent12bdefe00e38cdc3dd8cb028eeac325ab2e94e16 (diff)
parent889e54eab858b1928f74a8c179b32275b62f2286 (diff)
downloadafl++-0dc9967984df3f9c250d4c27b6de1cbd4cac3eb3.tar.gz
Merge pull request #403 from AFLplusplus/dev
push to master
Diffstat (limited to 'src/afl-tmin.c')
-rw-r--r--src/afl-tmin.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/afl-tmin.c b/src/afl-tmin.c
index 091e5177..9df5112b 100644
--- a/src/afl-tmin.c
+++ b/src/afl-tmin.c
@@ -54,7 +54,9 @@
 
 #include <sys/wait.h>
 #include <sys/time.h>
-#include <sys/shm.h>
+#ifndef USEMMAP
+  #include <sys/shm.h>
+#endif
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/resource.h>
@@ -67,12 +69,13 @@ static u8 *in_file,                    /* Minimizer input test case         */
 static u8 *in_data;                    /* Input data for trimming           */
 
 static u32 in_len,                     /* Input data length                 */
-    orig_cksum,                        /* Original checksum                 */
     missed_hangs,                      /* Misses due to hangs               */
     missed_crashes,                    /* Misses due to crashes             */
     missed_paths,                      /* Misses due to exec path diffs     */
     map_size = MAP_SIZE;
 
+static u64 orig_cksum;                 /* Original checksum                 */
+
 static u8 crash_mode,                  /* Crash-centric mode?               */
     hang_mode,                         /* Minimize as long as it hangs      */
     exit_crash,                        /* Treat non-zero exit as crash?     */
@@ -300,7 +303,7 @@ static u8 tmin_run_target(afl_forkserver_t *fsrv, char **argv, u8 *mem, u32 len,
 
   if (ret == FSRV_RUN_NOINST) { FATAL("Binary not instrumented?"); }
 
-  u32 cksum = hash32(fsrv->trace_bits, fsrv->map_size, HASH_CONST);
+  u64 cksum = hash64(fsrv->trace_bits, fsrv->map_size, HASH_CONST);
 
   if (first_run) { orig_cksum = cksum; }