Files
harfbuzz/test/fuzzing
Skef IterumandClaude 2476277f93 Enhance depend fuzzer to exercise full API
Update hb-depend-fuzzer to fully exercise the depend API by actually
retrieving and validating sets, not just accessing edge values.

Changes:
- Retrieve ligature sets when present using hb_depend_get_set_from_index
- Retrieve context sets when present using hb_depend_get_set_from_index
- Handle nested context sets (indirect references with 0x80000000 bit)
- Check all sets for sanity using hb_set_get_population
- Warn if empty sets are encountered (which shouldn't happen)

This catches bugs in set storage, retrieval, and the encoding of nested
context set references.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-05 22:27:15 -08:00
..
2023-05-27 01:16:46 +02:00
2024-06-20 11:17:10 -07:00
2025-04-06 02:34:48 -06:00

Security Fuzzers

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,depend}-fuzzer [-max_len=2048] [CORPUS_DIR]

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

Note: The depend fuzzer requires -Ddepend_api=true meson option.

For more details consult the following locations:

Depend Closure Parity Test

The hb-depend-closure-parity test is distinct from the security fuzzers. While security fuzzers test robustness against malformed input, the closure parity test validates correctness by emulating the glyph closure calculation used for subsetting with one generated from the dependency graph to avoid implementation divergence. It should only be run on valid fonts.