Keep the memory-backed FT_Face blob on the hb_face_t even when the
OpenType sanitizer discards its copy. Otherwise the destroy callback
can release the FT_Face while the face or font still uses it. Return
the empty object on allocation failure before accessing that pointer.
Keep a blob loader's input bytes on the FT_Face rather than the
hb_face_t, since retained table blobs can outlive the latter. Keep the
library reference on the input blob and release it outside the static
FreeType mutex. Initialize file-loader ownership before transferring
references as well.
Add regressions for destroy-callback timing, referenced font lifetime,
and table blobs retained past the source face. All 293 tests pass,
including all eight FreeType subtests under ASan and UBSan. A separate
sanitized ownership probe passes 154 allocation-failure cases.
Discovered by Anthropic's OSS Scanner, as vulnerabilities
ANT-2026-FC0F75Y2 and ANT-2026-O2E5WAA5.
Assisted-by: OpenAI Codex