When buffer verification detects non-monotone clusters, skip the
unsafe-to-break and unsafe-to-concat checks that rely on monotone
cluster order. Keep reporting the monotone-cluster failure as the
underlying verifier error.
Also turn the unsafe-to-break text range assertion into a verifier
failure so malformed intermediate verifier state does not abort the
process.
Testing:
meson test -C build
Assisted-by: OpenAI Codex
Two more cleanup sites now that the alias works for all HB types:
hb-buffer-verify.cc:
- buffer_verify_unsafe_to_break: fragment, reconstruction -> unique_ptr.
Remove two hb_buffer_destroy pairs on success/fail paths.
- buffer_verify_unsafe_to_concat: fragments[2] array + reconstruction
-> unique_ptr. Drop the goto-out cleanup cascade; the guards
handle destruction on every return path.
hb-graphite2.cc:
- _hb_graphite2_shaper_face_data_create: silf_blob -> unique_ptr.
Collapse the two hb_blob_destroy sites (early-return and
fall-through) to one.
All 240 tests pass.
Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove duplicate buffer->leave call
hb-shape.cc does it for us.
* Fail shaping if max len reached
* Increase buffer limits
https://github.com/harfbuzz/harfrust/issues/107
* Remove shaping_failed; fail in buffer.successful
I'm not sure if the old behavior was intentional, but it was checking
that the glyph flags were a subset of the reference buffer's glyph
flags. I don't see why that is useful. Fix that.
Then make the buffer-verify code ignore flag differences when verifying
buffers, since our unsafe-to-concat flag at least, is conservative and
not guaranteed to be produced the same in fragments. See:
https://github.com/harfbuzz/harfbuzz/issues/3888
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/hb-buffer.hh:60:1 in
failure on clusterfuzz-testcase-minimized-hb-subset-get-codepoints-fuzzer-5736539338833920