@@ -46,9 +46,19 @@ stdenv.mkDerivation rec {
4646 # bug in afl which causes it to fail to find `afl-qemu-trace`
4747 # relative to `afl-fuzz` or `afl-showmap`, so we instead set
4848 # $AFL_PATH as a workaround, which allows it to be found.
49− for x in `ls $out/bin/afl-*`; do
49+ for x in `ls $out/bin/afl-* | grep -v afl-clang-fast`; do
5050 wrapProgram $x --prefix AFL_PATH : "$out/bin"
5151 done
52+ # Wrap afl-clang-fast(++) with a *different* AFL_PATH, because it
53+ # has totally different semantics in that case(?) - and also set a
54+ # proper AFL_CC and AFL_CXX so we don't pick up the wrong one out
55+ # of $PATH.
56+ for x in $out/bin/afl-clang-fast $out/bin/afl-clang-fast++; do
57+ wrapProgram $x \
58+ --prefix AFL_PATH : "$out/lib/afl" \
59+ --prefix AFL_CC : "${clang}/bin/clang" \
60+ --prefix AFL_CXX : "${clang}/bin/clang++"
61+ done
5262 '';
5363
5464 meta = {