zstd/tests/fuzz
Nick Terrell 8b6c80ada8 Update fuzzer Makefile 2017-09-13 16:16:57 -07:00
..
Makefile Update fuzzer Makefile 2017-09-13 16:16:57 -07:00
README.md [fuzz] Move from fuzz/ to tests/fuzz/ 2017-07-03 12:40:12 -07:00
fuzz.h Update fuzzer sources 2017-09-13 16:16:57 -07:00
fuzz_helpers.h Update fuzzer sources 2017-09-13 16:16:57 -07:00
regression_driver.c Fix function name in tests/fuzz/regression_driver 2017-09-05 22:14:41 -07:00
simple_decompress.c Update fuzzer sources 2017-09-13 16:16:57 -07:00
simple_round_trip.c Update fuzzer sources 2017-09-13 16:16:57 -07:00
stream_decompress.c Update fuzzer sources 2017-09-13 16:16:57 -07:00
stream_round_trip.c Update fuzzer sources 2017-09-13 16:16:57 -07:00

README.md

Fuzzing

Each fuzzing target can be built with multiple engines.

LibFuzzer

You can install libFuzzer with make libFuzzer. Then you can make each target with make target LDFLAGS=-L. CC=clang CXX=clang++.

AFL

The regression driver also serves as a binary for afl-fuzz. You can make each target with one of these commands:

make target-regression CC=afl-clang CXX=afl-clang++
AFL_MSAN=1 make target-regression-msan CC=afl-clang CXX=afl-clang++
AFL_ASAN=1 make target-regression-uasan CC=afl-clang CXX=afl-clang++

Then run as ./target @@.

Regression Testing

Each fuzz target has a corpus checked into the repo under fuzz/corpora/. You can run regression tests on the corpora to ensure that inputs which previously exposed bugs still pass. You can make these targets to run the regression tests with different sanitizers.

make regression-test
make regression-test-msan
make regression-test-uasan