You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.3 kB

1234567891011121314151617181920212223242526
  1. # Fuzzers
  2. This directory contains fuzzers that
  3. target [llvm's LibFuzzer](https://llvm.org/docs/LibFuzzer.html). They are built
  4. and run automatically by
  5. Google's [OSS-Fuzz](https://github.com/google/oss-fuzz/) infrastructure.
  6. ## How do I test or run the fuzzers like oss-fuzz?
  7. ```
  8. git clone https://github.com/google/oss-fuzz.git
  9. cd oss-fuzz
  10. python infra/helper.py build_image json-c
  11. python infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 json-c
  12. python infra/helper.py run_fuzzer json-c tokener_parse_ex_fuzzer
  13. ```
  14. ## How do I add new unit or regression tests for the fuzzer?
  15. The tests directory contains json files that can be used to either test the fuzzer itself or be used as regression tests. As long as the files end in `.json`, cmake will pick them up and generate a Ctest test case. If/when oss-fuzz finds a bug with a fuzzer, simply pull that test case into the `./tests` directory and it will serve as a regression test.
  16. Note - the fuzzers are not being run with sanitizers in this repository's CI at the moment; we're strictly building them here to ensure that they function.
  17. ## How do I reproduce a failure form a fuzzer?
  18. Use [the steps detailed on OSS-fuzz](https://google.github.io/oss-fuzz/advanced-topics/reproducing/).