Bug 1885489 - Part 5: Add SnapshotIterator::readInt32(). r=iain
[gecko.git] / js / src / fuzz-tests / README
blob2c98c1ffa2665868e54aa3b6880a949dd41a5216
1 # JS Fuzzing Interface
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
11 for libFuzzer.
13 ## Running a fuzzing target
15 To run a particular target with libFuzzer, use:
17     cd $OBJDIR/dist/bin
18     FUZZER=YourTargetName ./fuzz-tests
20 To run with AFL, use something like
22     cd $OBJDIR/dist/bin
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