When fuzzing on my macOS Mojave laptop, I was unable to instrument the binaries with the command mentioned in the docs:
./configure --disable-ccache --disable-shared --enable-tests --enable-fuzz CC=${AFLPATH}/afl-gcc CXX=${AFLPATH}/afl-gcc++
This resulted in the following failure:
0[-] On Apple systems, 'gcc' is usually just a wrapper for clang. Please use the
1 'afl-clang' utility instead of 'afl-gcc'. If you really have GCC installed,
2 set AFL_CC or AFL_CXX to specify the correct path to that compiler.
3
4[-] PROGRAM ABORT : AFL_CC or AFL_CXX required on MacOS X
5 Location : edit_params(), afl-gcc.c:159
When I replaced afl-gcc with afl-clang and afl-g++ with afl-clang++, the binaries were properly instrumented. I made an issue instead of a PR as I wasn’t sure whether others had run into this problem or if this was specific to my machine. If this is reproducible on other Macs, then this should be documented in fuzzing.md
.