~yerinalexey/afl_harec

Hare instrumentation for AFL
Do not wrap I/O functions in +libc
Move __afl_maybe_log value into gen_context
Update for opaque

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~yerinalexey/afl_harec
read/write
git@git.sr.ht:~yerinalexey/afl_harec

You can also use your local clone with git send-email.

#afl_harec / afl-hare

A Hare compiler instrumentation for AFL.

#Building

mkdir build
cd build
../configure
make

#Using the instrumentation

In most cases, the following is enough:

  1. Import the afl module in a target program.
  2. Build that program using 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