Imported Upstream version 8.2.2
[platform/upstream/harfbuzz.git] / test / fuzzing / README.md
1 To build the fuzzers with libFuzzer to perform actual fuzzing, build with:
2
3 ```shell
4 CXX=clang++ CXXFLAGS="-fsanitize=address,fuzzer-no-link" meson fuzzbuild --default-library=static -Dfuzzer_ldflags="-fsanitize=address,fuzzer"
5
6 ninja -Cfuzzbuild
7 ```
8
9 Then, run the fuzzer like this:
10
11 fuzzbuild/test/fuzzing/hb-{shape,draw,subset,set}-fuzzer [-max_len=2048] [CORPUS_DIR]
12
13 Where max_len specifies the maximal length of font files to handle.
14 The smaller the faster.
15
16 For more details consult the following locations:
17   - http://llvm.org/docs/LibFuzzer.html