1
0
mirror of https://github.com/janet-lang/janet synced 2024-10-18 16:05:47 +00:00
janet/tools/afl
Calvin Rose 33d2f9a522 More changes how we use WideCharToMutliByte
Handle case where there is no data pushed in.
2024-08-18 07:23:06 -07:00
..
parser_testcases More changes how we use WideCharToMutliByte 2024-08-18 07:23:06 -07:00
aggregate_cases.sh Add afl fuzzing helpers. 2019-11-29 16:43:14 +13:00
fuzz.sh Add afl fuzzing helpers. 2019-11-29 16:43:14 +13:00
generate_unmarshal_testcases.janet Address #336 case 3 2020-04-05 17:38:14 -05:00
parser_runner.janet Add afl fuzzing helpers. 2019-11-29 16:43:14 +13:00
prepare_to_fuzz.sh Add afl fuzzing helpers. 2019-11-29 16:43:14 +13:00
README.md Setup some simple fuzz helpers for unmarshal. 2020-04-05 23:05:18 +12:00
unmarshal_runner.janet Make unmarshal fuzzer exercise more code paths. 2020-04-06 09:59:00 +12:00

AFL Fuzzing scripts

To use these, you need to install afl (of course), and xterm. A tiling window manager helps manage many concurrent fuzzer instances.

Note, afl sometimes requires system configuration, if you find AFL quitting prematurely, try manually launching it and addressing any error messages.

Fuzz the parser

$ sh ./tools/afl/prepare_to_fuzz.sh
$ export NFUZZ=1
$ sh ./tools/afl/fuzz.sh parser
Ctrl+C when done to close all fuzzer terminals.
$ sh ./tools/afl/aggregate_cases.sh parser
$ ls ./fuzz_out/parser_aggregated/

Fuzz the unmarshaller

$ janet ./tools/afl/generate_unmarshal_testcases.janet
$ sh ./tools/afl/prepare_to_fuzz.sh
$ export NFUZZ=1
$ sh ./tools/afl/fuzz.sh unmarshal
Ctrl+C when done to close all fuzzer terminals.
$ sh ./tools/afl/aggregate_cases.sh unmarshal
$ ls ./fuzz_out/unmarshal_aggregated/