about summary refs log tree commit diff
path: root/src/afl-performance.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-13 10:58:30 +0200
committervan Hauser <vh@thc.org>2020-06-13 10:58:30 +0200
commit1542c7f49c00cd7d701869f951b9a2a126a7b960 (patch)
tree9a31f02e924254e405b2c563efb38f0fc5eaba5f /src/afl-performance.c
parent615ab1a7b80a7d2ae827240313f4a68d76364cf6 (diff)
downloadafl++-1542c7f49c00cd7d701869f951b9a2a126a7b960.tar.gz
fix typos
Diffstat (limited to 'src/afl-performance.c')
-rw-r--r--src/afl-performance.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/afl-performance.c b/src/afl-performance.c
index 7a911ffd..28564eb8 100644
--- a/src/afl-performance.c
+++ b/src/afl-performance.c
@@ -1,10 +1,11 @@
-/*  Written in 2019 by David Blackman and Sebastiano Vigna (vigna@acm.org)
+/*
+   Written in 2019 by David Blackman and Sebastiano Vigna (vigna@acm.org)
 
-To the extent possible under law, the author has dedicated all copyright
-and related and neighboring rights to this software to the public domain
-worldwide. This software is distributed without any warranty.
+   To the extent possible under law, the author has dedicated all copyright
+   and related and neighboring rights to this software to the public domain
+   worldwide. This software is distributed without any warranty.
 
-See <http://creativecommons.org/publicdomain/zero/1.0/>.
+   See <http://creativecommons.org/publicdomain/zero/1.0/>.
 
    This is xoshiro256++ 1.0, one of our all-purpose, rock-solid generators.
    It has excellent (sub-ns) speed, a state (256 bits) that is large
@@ -15,13 +16,17 @@ See <http://creativecommons.org/publicdomain/zero/1.0/>.
 
    The state must be seeded so that it is not everywhere zero. If you have
    a 64-bit seed, we suggest to seed a splitmix64 generator and use its
-   output to fill s. */
+   output to fill s[].
+*/
 
 #include <stdint.h>
 #include "afl-fuzz.h"
 #include "types.h"
 #include "xxh3.h"
 
+/* we use xoshiro256** instead of rand/random because it is 10x faster and has
+   better randomness properties. */
+
 static inline uint64_t rotl(const uint64_t x, int k) {
 
   return (x << k) | (x >> (64 - k));
@@ -122,6 +127,9 @@ void long_jump(afl_state_t *afl) {
 
 }
 
+/* we switch from afl's murmur implementation to xxh3 as it is 30% faster -
+   and get 64 bit hashes instead of just 32 bit. Less collisions! :-) */
+
 u32 hash32(const void *key, u32 len, u32 seed) {
 
   return XXH64(key, len, seed) % 0x100000000;