Blame test/fuzzing/README

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