• Home
  • Raw
  • Download

Lines Matching full:fuzz

4 Zstd provides a fuzz corpus for each target that can be downloaded with
13 ## fuzz.py
15 `fuzz.py` is a helper script for building and running fuzzers.
16 Run `./fuzz.py -h` for the commands and run `./fuzz.py COMMAND -h` for
21 `fuzz.py` provides a utility to generate seed data for each fuzzer.
25 ./fuzz.py gen TARGET
44 Run `./fuzz.py build -h` for help.
48 `./fuzz.py` can run `libfuzzer`, `afl`, and `regression` tests.
50 Flags not parsed by `fuzz.py` are passed to the fuzzing engine.
53 Here's a helpful command to fuzz each target across all cores,
56 for target in $(./fuzz.py list); do
57 ./fuzz.py libfuzzer $target -jobs=10 -workers=10 -max_total_time=1000 || break;
60 Alternatively, you can fuzz all targets in parallel, using one core per target:
62 python3 ./fuzz.py list | xargs -P$(python3 ./fuzz.py list | wc -l) -I__ sh -c "python3 ./fuzz.py li…
70 # Build the fuzz targets
71 ./fuzz.py build all --enable-fuzzer --enable-asan --enable-ubsan --cc clang --cxx clang++
73 CC=clang CXX=clang++ ./fuzz.py build all --enable-fuzzer --enable-asan --enable-ubsan
75 ./fuzz.py libfuzzer TARGET <libfuzzer args like -jobs=4>
85 CC=clang CXX=clang++ ./fuzz.py build all --enable-fuzzer --enable-msan
86 ./fuzz.py libfuzzer TARGET <libfuzzer args>
89 `fuzz.py` respects the environment variables / flags `MSAN_EXTRA_CPPFLAGS`,
99 # Build the fuzz targets
100 CC=afl-clang CXX=afl-clang++ ./fuzz.py build all --enable-asan --enable-ubsan
102 ./fuzz.py afl TARGET -m none
111 CC=clang CXX=clang++ ./fuzz.py build all --enable-asan --enable-ubsan
112 ./fuzz.py regression all
113 CC=clang CXX=clang++ ./fuzz.py build all --enable-msan
114 ./fuzz.py regression all
125 1. Create a new your fuzzer harness `tests/fuzz/your_harness.c`.
129fuzz/Makefile#L216) if your fuzzer requires both compression and decompression symbols (prefix `rt…
131 …//github.com/facebook/zstd/blob/6a0052a409e2604bd40354b76b86272b712edd7d/tests/fuzz/Makefile#L108).
133 …. Add your harness to [`fuzz.py`](https://github.com/facebook/zstd/blob/6a0052a409e2604bd40354b76b…
139 ./fuzz.py gen your_harness
145 ./fuzz.py build your_harness --enable-fuzzer --enable-asan --enable-ubsan --cc clang --cxx clang++
146 ./fuzz.py libfuzzer your_harness
150 After running the fuzzer for a while, you will have a large corpus at `tests/fuzz/corpora/your_harn…
153 ./fuzz.py minimize your_harness
154 ./fuzz.py zip your_harness
159 This corpus must be uploaded to GitHub here: https://github.com/facebook/zstd/releases/tag/fuzz-cor…