Blame test/fuzzing/README

Packit 874993
In order to build the fuzzer one needs to build HarfBuzz and
Packit 874993
harfbuzz/test/fuzzing/hb-fuzzer.cc with:
Packit 874993
  - Using the most recent Clang
Packit 874993
  - With -fsanitize=address (or =undefined, or a combination)
Packit 874993
  - With -fsanitize-coverage=edge[,8bit-counters,trace-cmp]
Packit 874993
  - With various defines that limit worst case exponential behavior.
Packit 874993
    See FUZZING_CPPFLAGS in harfbuzz/src/Makefile.am for the list.
Packit 874993
  - link against libFuzzer
Packit 874993
Packit 874993
To run the fuzzer one needs to first obtain a test corpus as a directory
Packit 874993
containing interesting fonts.  A good starting point is inside
Packit 874993
harfbuzz/test/shaping/fonts/fonts/.
Packit 874993
Then, run the fuzzer like this:
Packit 874993
   ./hb-fuzzer -max_len=2048 CORPUS_DIR
Packit 874993
Where max_len specifies the maximal length of font files to handle.
Packit 874993
The smaller the faster.
Packit 874993
Packit 874993
For more details consult the following locations:
Packit 874993
  - http://llvm.org/docs/LibFuzzer.html or
Packit 874993
  - https://github.com/google/libfuzzer-bot/tree/master/harfbuzz
Packit 874993
  - https://github.com/behdad/harfbuzz/issues/139