tree: 8bbd45efb329a324fa0a2676c53f9d8c642017c7 [path history] [tgz]
  1. corpus/
  2. testdata/
  3. fuzz_test.go
  4. main.go

This is an explanation of how to do fuzzing of ParseData. This uses for fuzzing.

How to use

First, get go-fuzz

$ go get
$ go get

Build the test program by calling the following command (assuming you have files for pprof located in within go's src folder)

$ go-fuzz-build

The above command will produce

Now you can run the fuzzer by calling

$ go-fuzz -bin=./ -workdir=fuzz

This will save a corpus of files used by the fuzzer in ./fuzz/corpus, and all files that caused ParseData to crash in ./fuzz/crashers.

For more details on the usage, see

About the to corpus

Right now, fuzz/corpus contains the corpus initially given to the fuzzer

If using the above commands, fuzz/corpus will be used to generate the initial corpus during fuzz testing.

One can add profiles into the corpus by placing these files in the corpus directory (fuzz/corpus) prior to calling go-fuzz-build.