nim-json-serialization/fuzzer
jangko 1996de769b
Add fuzz test
2023-12-26 16:03:47 +07:00
..
fuzz_lexer.nim Add fuzz test 2023-12-26 16:03:47 +07:00
fuzz_parser.nim Add fuzz test 2023-12-26 16:03:47 +07:00
readme.md Add fuzz test 2023-12-26 16:03:47 +07:00

readme.md

Fuzz test manual

You need to install testutils and chronicles. Then read documentation over there to prepare your execution environment.

Compatibility

These fuzzers can be compiled with Nim v1.6.16 or newer.

Available fuzz test

  • fuzz_lexer
  • fuzz_parser

Manually with libFuzzer/llvmFuzer

Compiling

nim c -d:llvmFuzzer -d:release -d:chronicles_log_level=FATAL --noMain --cc=clang --passC="-fsanitize=fuzzer" --passL="-fsanitize=fuzzer" fuzzer/fuzz_lexer

Starting the Fuzzer

Starting the fuzzer is as simple as running the compiled program:

./fuzz_lexer corpus_dir -runs=1000000

To see the available options:

./fuzz_lexer test=1

You can also use the application to verify a specific test case:

./fuzz_lexer input_file