Home | History | Annotate | only in /external/harfbuzz_ng/test/fuzzing
Up to higher level directory
NameDateSize
CMakeLists.txt22-Oct-20201.2K
fonts/22-Oct-2020
hb-fuzzer.hh22-Oct-2020110
hb-shape-fuzzer.cc22-Oct-20201.3K
hb-subset-fuzzer.cc22-Oct-20202K
main.cc22-Oct-2020485
Makefile.am22-Oct-20201.5K
README22-Oct-2020967
run-shape-fuzzer-tests.py22-Oct-20202.3K
run-subset-fuzzer-tests.py22-Oct-20201.3K

README

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