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