* [varc/colr] Bound tuple decoding and guard variation-index overflow
Preflight packed tuple runs before allocating decoded vectors, reject
truncated runs, and stop failed iterators at the end of their input.
Charge VARC axis expansion to the draw budget before resizing scratch
vectors. Guard variation-index addition and clip-box closure, using
checked 32-bit arithmetic for COLR ranges and preserving valid prefixes
below the reserved sentinel.
Run VARC draw tests under their actual feature guard instead of the
stale experimental-API guard. Keep tests compatible with GCC ASan,
older GLib, and builds with variations disabled.
Based on the hardening work in PR #6533.
Testing: all 275 default Meson tests and 294 experimental-API tests pass.
The machinery, VARC draw, color, and COLR subset tests pass under Clang
ASan/UBSan with the default APIs; the VARC draw suite runs all 11 cases.
GCC/Clang ASan syntax checks, GLib 2.66 API-availability checks, and the
HB_NO_VAR machinery test pass.
Co-authored-by: Nathan Keys <professor.moody@pm.me>
Assisted-by: OpenAI Codex
* [test] Put tuple and COLR regressions with their subsystems
Restore test-machinery to its original purpose. Put packed-tuple
regressions in test-tuple-varstore and the instancer regression in
test-item-varstore. Give the COLR closure checks their own test-colr
unit target. Use the local hb_always_assert convention and remove the
ad-hoc check macro, method-detection templates, and test-mode dispatcher.
Testing: all 276 default Meson tests pass. The tuple/item varstore,
COLR, VARC draw, color, and COLR subset tests pass under ASan/UBSan.
Assisted-by: OpenAI Codex
* [ot] Use an unsigned result for checked variation-index addition
The ARM EABI toolchain defines uint32_t as unsigned long, while
hb_unsigned_add_overflows accepts unsigned*. Store the checked sum in
an unsigned temporary and assign it back, preserving the overflow and
NO_VARIATION checks without depending on typedef identity.
Testing: all 276 Meson tests pass. A distinct-unsigned-long compile check
covers normal, sentinel, and overflow inputs.
Assisted-by: OpenAI Codex
* [test] Remove allocator-specific VARC test instrumentation
Drop the heap-accounting regression and its sanitizer and libc hooks.
Keep the ordinary VARC budget and truncated-axis regression tests.
All 276 Meson tests pass. The tuple/item varstore, COLR, VARC draw,
color, and COLR subset tests also pass under Clang ASan/UBSan.
Assisted-by: OpenAI Codex
---------
Co-authored-by: Nathan Keys <professor.moody@pm.me>