Commit Graph
12 Commits
Author SHA1 Message Date
Behdad Esfahbod 2adb01a47c [internal] Replace remaining vector resize(0) with clear()
Two callers were still using vector.resize(0) to drop accumulated
data: graph/serialize.hh's overflow tracking and hb_bit_set_t's
clear() (via its own internal resize()).  resize(0) on a vector
in error state short-circuits without zeroing length, leaving
stale entries that downstream code then walks as if valid.

Fix both:

 - serialize.hh: call overflows->clear() instead.
 - hb-bit-set.hh: reimplement clear() to zero length/population
   unconditionally by calling pages.clear() / page_map.clear()
   directly, bypassing the internal resize() that bails when
   `successful` is false.

Mirrors the March clear() fix in hb-vector.hh (commit d134f88824).

Assisted-by: Claude <noreply@anthropic.com>
2026-04-14 22:04:57 -06:00
Garret Rieger 54ab8f0df4 [repacker] make repacker object ids stable.
Prior to this change the object id for a vertex in the repacker graph is it's position in the topological ordering. As a result after each sorting the object ids change. This decouples the topological sorting from the object id assignments. A separate ordering list is retained. This simplifies handling around object ids which no longer needs to account for them shifting, and improves performance by eliminating the step of reassigned link object ids after each sort.
2025-09-15 16:34:44 -06:00
Garret Rieger 18c67b7789 [repacker] store liga counts before processing.
Otherwise processing changes the counts when we need them later on.
2025-07-08 22:40:18 +00:00
Behdad Esfahbod ada1e9a924 [graph/serialize] Handle empty blob
Fixes https://oss-fuzz.com/testcase-detail/4877513265119232
2023-06-06 14:46:47 -06:00
Behdad Esfahbod 3c2a925b7f [graph] Micro-optimize 2023-05-08 10:16:50 -06:00
Behdad Esfahbod ed023f66df Enable -Wformat-signedness
And fix the codebase.
2023-01-12 17:04:24 -07:00
Behdad Esfahbod 4afcdf675b More hb_memcpy 2022-11-22 12:56:48 -07:00
Garret Rieger dd1ba328a8 [repacker] fix fuzzer timeout.
For https://oss-fuzz.com/testcase-detail/5845846876356608. Only process the set of unique overflows.
2022-11-21 16:24:48 -07:00
Garret Rieger ae290ff4fe [repacker] add sanitization for GSUB/LookupList/Lookup during extension promotion. 2022-07-26 12:22:17 -06:00
Garret Rieger 7e6f6c3e88 [repack] fix new node bounds. 2022-07-26 12:22:17 -06:00
Garret Rieger 7078560e33 [repacker] extract graph serialization code into a seperate file. 2022-06-24 17:16:50 -06:00
Garret Rieger 20b02a672d [repacker] Begin splitting up the repacker implementation into several files. 2022-06-24 17:16:50 -06:00