unplugged-system/external/harfbuzz_ng/test/fuzzing
2025-10-06 13:59:42 +00:00
..
fonts Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
graphs Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
sets Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
hb-draw-fuzzer.cc Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
hb-fuzzer.hh Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
hb-repacker-fuzzer.cc Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
hb-set-fuzzer.cc Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
hb-shape-fuzzer.cc Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
hb-subset-fuzzer.cc Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
main.cc Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
Makefile.am Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
meson.build Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
README.md Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
run-draw-fuzzer-tests.py Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
run-repacker-fuzzer-tests.py Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
run-shape-fuzzer-tests.py Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
run-subset-fuzzer-tests.py Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00

To build the fuzzers with libFuzzer to perform actual fuzzing, build with:

CXX=clang++ CXXFLAGS="-fsanitize=address,fuzzer-no-link" meson fuzzbuild --default-library=static -Dfuzzer_ldflags="-fsanitize=address,fuzzer"

ninja -Cfuzzbuild

Then, run the fuzzer like this:

fuzzbuild/test/fuzzing/hb-{shape,draw,subset,set}-fuzzer [-max_len=2048] [CORPUS_DIR]

Where max_len specifies the maximal length of font files to handle. The smaller the faster.

For more details consult the following locations: