Behdad Esfahbod
326d319f93
[graph] Micro-optimize
2023-07-15 13:14:34 -06:00
Behdad Esfahbod
548230e45e
[graph] Early return from a function
2023-07-15 13:13:16 -06:00
Behdad Esfahbod
09706b04fc
[graph] Add a pre-alloc to map
2023-07-15 13:11:04 -06:00
Behdad Esfahbod
d1ddfc4d10
[graph] Use move instead of swap
2023-07-14 14:52:43 -06:00
Behdad Esfahbod
07cb6bf87a
[graph] Minor, type
2023-07-14 13:38:33 -06:00
Behdad Esfahbod
867640af31
Revert "[set] Add test_and_add / test_and_del"
...
This reverts commit de1237fbf2 .
This seems to be a net loss.
2023-07-14 13:09:16 -06:00
Behdad Esfahbod
10b776b0c3
[graph] Micro-optimize
2023-07-14 13:08:19 -06:00
Behdad Esfahbod
de1237fbf2
[set] Add test_and_add / test_and_del
...
Use in graph.
2023-07-14 12:38:56 -06:00
Behdad Esfahbod
7f1ff9c881
[graph] Micro-optimize array access
2023-07-14 12:22:24 -06:00
Behdad Esfahbod
11308c4d1f
[graph] Remove manual destruction
...
Happens automatically by destructor.
2023-06-08 14:51:18 -06:00
Behdad Esfahbod
67b1624727
[set] Simplify a few set iterations as range loop
2023-06-07 16:25:11 -06: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
ca27925d55
Use hb_codepoint_pair_t in more places
2023-06-03 16:18:15 -06:00
Garret Rieger
ff326fbe8f
[repacker] check the result of add_buffer() in other places where it's called.
2023-05-30 01:40:57 +02:00
Garret Rieger
20c564bc76
[repacker] Fix fuzzer memory leak.
...
https://oss-fuzz.com/testcase-detail/6419865171525632
2023-05-27 01:16:46 +02:00
Behdad Esfahbod
3c2a925b7f
[graph] Micro-optimize
2023-05-08 10:16:50 -06:00
Behdad Esfahbod
3f9eb03b40
[graph] Micro-optimize
2023-05-01 12:55:29 -06:00
Garret Rieger
b3fed4fa64
[repacker] fix fuzzer found memory leak.
...
Fixes https://oss-fuzz.com/testcase-detail/5196242811748352
2023-04-27 17:18:47 -06:00
Garret Rieger
e4fff64ce3
[repacker] check duplicate() for success.
...
Fixes fuzzer testcase https://oss-fuzz.com/testcase-detail/5475787333828608 .
2023-01-23 18:37:13 -07:00
Behdad Esfahbod
ed023f66df
Enable -Wformat-signedness
...
And fix the codebase.
2023-01-12 17:04:24 -07:00
Garret Rieger
35233d2514
[repacker] fix fuzzer reported stack overflow.
...
Fixes https://oss-fuzz.com/testcase-detail/6014493291577344 .
2022-12-07 10:32:56 -07:00
Garret Rieger
f1d3489388
[repacker] bail on failure to alloc assigned_bytes set.
...
Fixes fuzzer issue https://oss-fuzz.com/testcase-detail/5390364397928448 .
2022-12-05 14:13:47 -07:00
Garret Rieger
239a5aca02
[repacker] don't allow references to the null object in graph.
...
Fixes fuzzer issue https://oss-fuzz.com/testcase-detail/6714085985353728
2022-12-05 14:13:47 -07:00
Behdad Esfahbod
2cdaedaf54
Use hb_enumerate in more places
2022-12-03 10:16:35 -07:00
Garret Rieger
de5a621322
[repacker] enforce root node having no incoming edges.
2022-12-01 23:37:16 +00:00
Garret Rieger
30e405e470
[repacker] ensure link obj indices are valid.
2022-12-01 22:12:59 +00:00
Garret Rieger
554ed06fac
[repacker] add cycle detection to the graph sort.
...
This allows us to bail early if the graph is not acyclic.
2022-12-01 21:52:37 +00:00
Garret Rieger
9e99d08470
[repacker] validate link widths during repacker setup.
2022-12-01 20:17:41 +00:00
Garret Rieger
edf7a29595
[repacker] Validate link positions before running the repacker.
2022-12-01 20:17:41 +00:00
Garret Rieger
deca30b268
[repacker] get repacker fuzzer working.
...
Additionally add helper method that allows a graph to be saved as a fuzzer seed.
2022-12-01 20:17:40 +00:00
Garret Rieger
985b19f678
[repacker] begin implementing a fuzzer for the repacker api.
2022-12-01 20:17:39 +00:00
Behdad Esfahbod
915c1a00cf
[vector] Add remove_unordered
...
Saves 5% in NotoNastaliq/1000 subset benchmark.
2022-11-26 14:48:57 -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
Behdad Esfahbod
02b76393ef
[config] Re-enable BORING_EXPANSION
...
Only the non-experimental parts (currently avar2) are
enabled by default.
2022-10-29 11:19:04 -06:00
Joel Auterson
c813f84235
Make build work for arm-none-eabi
2022-10-21 11:09:35 -06:00
Garret Rieger
9559d3c1c1
[repacker] fix incorrect coverage table size estimation.
...
During splitting of PairPosFormat2 the code was assuming the maximum size of the generated coverage table would be equal too the current size. This is incorrect size the new coverage table may not preserve the ranges found in the original coverage table (since we are splitting based on class, not coverage) and in the worst case may convert from format2 to format1. So use the size of a format1 table as the max size.
2022-10-11 14:06:04 -06:00
Garret Rieger
99f4668e19
[repacker] use mutable copies of Coverage/ClassDef in MarkBasePos shrink operation.
...
Also make mutable copies (when needed) of the top level subtables during a split operation.
2022-09-30 10:58:50 -06:00
Behdad Esfahbod
56c4670935
[subset] Fix compiler warning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3823
2022-09-20 17:40:13 -06:00
Garret Rieger
a91bfeeda5
[repacker] comment cleanup.
2022-08-18 22:01:48 +00:00
Garret Rieger
bf28b84ae8
[repacker] cleanup unused base_array_id.
2022-08-18 01:51:37 +00:00
Garret Rieger
31976bfb50
[repacker] cleanup unused base_array_links.
2022-08-18 01:50:35 +00:00
Garret Rieger
6f5c52b604
[repacker] optimize AnchorMatrix::clone.
...
Previous runtime is O(n^2) reduced to O(n).
2022-08-18 01:48:10 +00:00
Garret Rieger
29e3b2467e
[repacker] optimzie remove_real_links as it's a hot method.
2022-08-18 01:19:54 +00:00
Garret Rieger
46b5dbd7ce
[repacker] optimize index_for_offset.
2022-08-18 01:18:16 +00:00
Garret Rieger
52303638b9
[repacker] correct size calculation for MarkBasePosFormat1.
2022-08-18 01:10:42 +00:00
Garret Rieger
ac1a853abc
[repacker] implement sanitize methods for MarkBasePos.
2022-08-18 00:55:47 +00:00
Garret Rieger
a3ed9f9099
[repacker] fix graph comparison, and mark base pos generation for the tests.
2022-08-17 23:39:11 +00:00
Garret Rieger
b46ced9562
[repacker] correct MarkArray size calculation.
2022-08-17 17:51:29 +00:00
Garret Rieger
36c76c27c6
[repacker] when clearing links in MarkArray, also clear parents of the children.
2022-08-17 17:30:21 +00:00