Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
fonts/ | 12-May-2024 | - | 3 | 2 | ||
sets/ | 12-May-2024 | - | 1 | 0 | ||
Makefile.am | D | 12-May-2024 | 2.2 KiB | 87 | 71 | |
README | D | 12-May-2024 | 967 | 22 | 19 | |
hb-draw-fuzzer.cc | D | 12-May-2024 | 6.2 KiB | 178 | 150 | |
hb-fuzzer.hh | D | 12-May-2024 | 409 | 19 | 13 | |
hb-set-fuzzer.cc | D | 12-May-2024 | 2 KiB | 91 | 68 | |
hb-shape-fuzzer.cc | D | 12-May-2024 | 1.8 KiB | 63 | 50 | |
hb-subset-fuzzer.cc | D | 12-May-2024 | 2.9 KiB | 107 | 84 | |
main.cc | D | 12-May-2024 | 446 | 21 | 15 | |
meson.build | D | 12-May-2024 | 1.6 KiB | 66 | 57 | |
run-draw-fuzzer-tests.py | D | 12-May-2024 | 1.8 KiB | 67 | 45 | |
run-shape-fuzzer-tests.py | D | 12-May-2024 | 1.8 KiB | 66 | 44 | |
run-subset-fuzzer-tests.py | D | 12-May-2024 | 2.1 KiB | 73 | 49 |
README
1In order to build the fuzzer one needs to build HarfBuzz and 2harfbuzz/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 10To run the fuzzer one needs to first obtain a test corpus as a directory 11containing interesting fonts. A good starting point is inside 12harfbuzz/test/shaping/fonts/fonts/. 13Then, run the fuzzer like this: 14 ./hb-fuzzer -max_len=2048 CORPUS_DIR 15Where max_len specifies the maximal length of font files to handle. 16The smaller the faster. 17 18For 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