Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

README.md 1.1 KiB

12345678910111213141516171819202122232425262728293031323334353637
  1. This is an explanation of how to do fuzzing of ParseData. This uses github.com/dvyukov/go-fuzz/ for fuzzing.
  2. # How to use
  3. First, get go-fuzz
  4. ```
  5. $ go get github.com/dvyukov/go-fuzz/go-fuzz
  6. $ go get github.com/dvyukov/go-fuzz/go-fuzz-build
  7. ```
  8. Build the test program by calling the following command
  9. (assuming you have files for pprof located in github.com/google/pprof within go's src folder)
  10. ```
  11. $ go-fuzz-build github.com/google/pprof/fuzz
  12. ```
  13. The above command will produce pprof-fuzz.zip
  14. Now you can run the fuzzer by calling
  15. ```
  16. $ go-fuzz -bin=./pprof-fuzz.zip -workdir=fuzz
  17. ```
  18. This will save a corpus of files used by the fuzzer in ./fuzz/corpus, and
  19. all files that caused ParseData to crash in ./fuzz/crashers.
  20. For more details on the usage, see github.com/dvyukov/go-fuzz/
  21. # About the to corpus
  22. Right now, fuzz/corpus contains the corpus initially given to the fuzzer
  23. If using the above commands, fuzz/corpus will be used to generate the initial corpus during fuzz testing.
  24. One can add profiles into the corpus by placing these files in the corpus directory (fuzz/corpus)
  25. prior to calling go-fuzz-build.