Do not wrap I/O functions in +libc
Move __afl_maybe_log value into gen_context
Update for opaque
A Hare compiler instrumentation for AFL.
mkdir build
cd build
../configure
make
In most cases, the following is enough:
afl
module in a target program.afl-hare
instead of hare
with the same
arguments. Using HARE=afl-hare
setting for custom build systems is also
supported.Example:
// test.ha
use afl; // !!!
use io;
use os;
export fn main() void = {
const buf = io::drain(os::stdin)!;
if (len(buf) > 0 && buf[0] == 42) {
abort("ohno");
};
};
$ afl-hare build -o test test.ha
$ afl-fuzz -i /tmp/in -o /tmp/out ./test