2
0
mirror of https://github.com/boostorg/json.git synced 2026-02-02 21:02:18 +00:00
Files
json/fuzzing
Paul Dreik 559b6a02f9 Add crash data for #221
close #241
2020-09-01 11:38:22 -07:00
..
2020-09-01 11:38:22 -07:00
2020-08-22 06:37:07 -07:00
2020-08-22 06:37:07 -07:00
2020-08-22 06:37:07 -07:00
2020-08-22 06:37:07 -07:00
2020-08-22 06:37:07 -07:00

Fuzzing

Boost json has support for fuzzing. Clang/libFuzzer is used.

Building and running the fuzzers

Execute the fuzzing/fuzz.sh script. You need clang++ installed. The fuzzer script will start fuzzing for a limited time, interrupt it if you wish.

There are several fuzzers, to exercise different parts of the api, following the usage examples in the documentation.

Running fuzzing

Either modify the fuzz.sh script, or run it to build the fuzzer and then issue:

mkdir -p out
./fuzzer_basic_parser out

Rerunning old crashes

Given a test case testcase.json, build the fuzzer and execute it with the test file:

./fuzzer_basic_parser testcase.json