The raster and vector fuzzers called create_or_fail() and then
immediately dereferenced the returned pointers. Under CIFuzz's
allocation-failure coverage, that turns a valid NULL return into a
harness crash instead of treating it as an out-of-memory case.
Return early after cleaning up when draw or paint context creation
fails. This keeps the fuzzers aligned with the create_or_fail()
contract and avoids null-deref crashes unrelated to library logic.
Tested:
- meson compile -C build hb-raster-fuzzer hb-vector-fuzzer
- build/test/fuzzing/hb-vector-fuzzer test/fuzzing/fonts/TwemojiMozilla.subset.ttf
- build/test/fuzzing/hb-raster-fuzzer test/fuzzing/fonts/TwemojiMozilla.subset.ttf
Assisted-by: OpenAI Codex
Skip the SVG table accelerator and do not define the public
SVG color APIs when HB_NO_SVG is set. Guard internal
callers so SVG-table-dependent code compiles out cleanly,
and add HB_NO_SVG to the HB_TINY profile.
Tested: meson setup build-nosvg -Dc_args=-DHB_NO_SVG -Dcpp_args=-DHB_NO_SVG
Tested: meson compile -C build-nosvg hb-shape hb-info hb-vector main
Tested: meson compile -C build-nosvg (libharfbuzz/libharfbuzz-raster/libharfbuzz-vector linked; full tree stopped on unrelated missing chafa.h in util/hb-raster.cc)
Tested: nm -gU build-nosvg/src/libharfbuzz.0.dylib | grep -E "hb_ot_color_.*svg" (no matches)
Assisted-by: OpenAI Codex
Root cause: the guide required descriptive commit messages,
but it did not encode the preferred body width or the
preference to skip irrelevant testing boilerplate.
Update AGENTS.md to recommend wrapping commit message
bodies to about 70 columns and to mention testing only
when it was actually performed or otherwise relevant.
Assisted-by: OpenAI Codex
Root cause: the previous guide had accumulated useful project-specific guidance, but too much detail made the core constraints and workflow harder to scan quickly.
Rewrite AGENTS.md into a shorter structure that keeps the important HarfBuzz-specific rules around API/ABI stability, build and test expectations, feature-guarded builds, generator-driven updates, commit conventions, and project mindset, while removing lower-signal detail. Add back a short Wisdom section to preserve project tone without re-expanding the file.
Testing: not run (documentation-only change).
Assisted-by: OpenAI Codex
Root cause: the repository guide captured broad commit hygiene expectations, but it did not explicitly encode the preferred subject prefix style, issue-linking trailers, or the required Assisted-by trailer.
Update AGENTS.md to require consistent bracketed subsystem prefixes, recommend Fixes: trailers when relevant, and require Assisted-by on commits written through the agent.
Testing: not run (documentation-only change).
Assisted-by: OpenAI Codex
Root cause: the repository guide captured explicit project rules, but it did not yet encode several stable engineering patterns visible across the last 1000 commits.
Update AGENTS.md to reflect recurring HarfBuzz practices: incremental helper extraction over large rewrites, pairing bug fixes with reproducible regressions or fuzz coverage, keeping docs and build/install wiring aligned with feature changes, treating generated data as generator-driven work, and validating simplifications carefully because semantic regressions are often only caught later.
Testing: not run (documentation-only change).
Root cause: the guide had accumulated useful project-specific guidance, but the structure made it harder to scan and apply consistently.
Reorganize AGENTS.md around core rules, build and verification flow, repository layout, change-specific guidance, and working mindset while preserving the existing instructions and recent review-driven additions.
Testing: not run (documentation-only change).
Root cause: the initial repository guide omitted several project-specific expectations raised during review and listed non-installed utilities in the util map.
Update AGENTS.md to reflect HarfBuzz conventions around API/ABI stability, new API documentation with XSince: REPLACEME, warning-free rebuild expectations, OOM and error-handling guidance, root-cause-first debugging, and descriptive commit messages. Also limit the utility list to installed command-line tools.
Testing: not run (documentation-only change).
Use checked arithmetic when calculating the number of extra glyphs
needed during stch processing. Includes a new hb_unsigned_add_overflows
helper in hb-algs.hh.
Co-authored-by: Codex (AI assistant)
Co-authored-by: Gemini (AI assistant)
GTK-Doc does not seem to support mark down code blocks markup. Use the
other way, and mark the language as plain text because code coloring
looks a bit ugly.