3 This directory contains fuzzing targets that implement the unified fuzzing
4 interface to be used with libFuzzer or AFL.
6 ## Building the fuzzing targets
8 To include this directory in your JS build, you need to build with Clang
9 and the --enable-fuzzing flag enabled. The build system will automatically
10 detect if you are building with afl-clang-fast for AFL or regular Clang
13 ## Running a fuzzing target
15 To run a particular target with libFuzzer, use:
18 FUZZER=YourTargetName ./fuzz-tests
20 To run with AFL, use something like
23 FUZZER=YourTargetName MOZ_FUZZ_TESTFILE=input \
24 afl-fuzz <regular AFL options> -f input ./fuzz-tests
27 ## Writing a fuzzing target
29 1. Check testExample.cpp for a target skeleton with comments.
31 2. Add your own .cpp file to UNIFIED_SOURCES in moz.build