This directory contains fuzzers that
target llvm's LibFuzzer. They are built
and run automatically by
Google's OSS-Fuzz infrastructure.
git clone https://github.com/google/oss-fuzz.git
cd oss-fuzz
python infra/helper.py build_image json-c
python infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 json-c
python infra/helper.py run_fuzzer json-c tokener_parse_ex_fuzzer
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.
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.