src/hb-serialize.hh


Log

Author Commit Date CI Message
Behdad Esfahbod fc80d20c 2023-06-23T15:21:30 [serialize] Only hash at most 128 bytes for object_t Optimization. Shouldn't in reality bring down the hash performance. Byte objects differ in their early bytes anyway.
Behdad Esfahbod a92b288e 2023-06-06T14:32:25 [serializer] Handle snapshotting when current is nullptr Happens with memory failure / fuzzing. Fixes https://oss-fuzz.com/testcase-detail/6292420615340032
Behdad Esfahbod 89ce8048 2023-06-04T10:20:39 [serialize] Remove attribute malloc This broke tests. It wasn't technically correct.
Behdad Esfahbod 3f2a1b64 2023-06-04T10:13:53 Fix build
Behdad Esfahbod e1715056 2023-06-04T10:09:02 [serialize] One more attribute
Behdad Esfahbod 15048e50 2023-06-04T10:07:04 [serialize] Add more function attributes
Behdad Esfahbod aad12ca6 2023-06-04T09:57:51 [serialize] Add a few function attributes
Garret Rieger f3b4d35f 2023-05-29T22:38:40 [subset] Fix fuzzer crash. https://oss-fuzz.com/testcase-detail/6608005089853440
Behdad Esfahbod a4b7033d 2023-02-19T17:48:02 [cff2-subset] Blend Private values when instancing
Behdad Esfahbod 2eacc37e 2022-12-31T12:27:13 [vector] Add internal API for exact-size allocation Use it from a couple of places.
Behdad Esfahbod 071a2bb4 2022-12-03T13:03:38 [serialize] Support zerocopy while sharing
Behdad Esfahbod 3ade2ffa 2022-12-02T14:26:36 [serialize] Adjust pop_discard for zerocopy
Behdad Esfahbod 6012d3b2 2022-12-01T17:33:53 [subset-cff] Write out charstrings zerocopy to serializer
Behdad Esfahbod 38430006 2022-12-01T16:48:22 [serialize] Add start_zerocopy()
Behdad Esfahbod 0b826368 2022-12-01T14:23:25 [serializer] Don't memset memory in embed Not necessary.
Behdad Esfahbod 3b68c714 2022-12-01T14:19:27 [array] Don't clear serializer buffer when copying out Not needed.
Behdad Esfahbod 1fed366d 2022-11-25T12:37:24 [serialize] Shut compiler warning off
Behdad Esfahbod 59c45f6d 2022-11-22T12:54:50 Use hb_memcpy instead of memcpy consistently
Behdad Esfahbod 3d1c76f7 2022-11-21T19:40:32 [serializer] Don't hash objects twice
Behdad Esfahbod afd716d4 2022-11-16T12:28:56 [serialize] Don't free object-pool in reset()
Garret Rieger 07fd0528 2022-08-15T23:16:51 [repacker] add graph equality check. Does not compare topological sorting, but looks for equivalence of the two graphs.
Behdad Esfahbod f4f7d691 2022-08-09T22:23:23 Merge pull request #3779 from harfbuzz/split_pair_pos_2 [repacker] Add PairPosFormat2 table splitting in the repacker.
Qunxin Liu 7fde6ab0 2022-08-05T13:33:22 fuzzer fix: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49790
Garret Rieger a733a9af 2022-08-05T00:32:47 [repacker] insert new subtables immediately after the subtable they split from in the lookup.
Behdad Esfahbod b3f689e7 2022-06-10T07:31:47 [serializer] Remove TODO that's not gonna happen
Behdad Esfahbod 3f78a71c 2022-06-02T11:11:35 [map] Finally! Just can usd hb_hashmap_t<obj_t, obj_t> Yay!
Behdad Esfahbod 0ccab339 2022-06-02T10:43:36 [map] Remove invalid-key template arguments since unused
Garret Rieger cbf8f44c 2022-05-19T21:25:21 [subset-perf] swap instead of copying vertice's when reordering during sort.
Behdad Esfahbod 6eaa22e9 2022-05-19T18:00:58 [serialize] Reduce link_t size from 16 to 12
Qunxin Liu a35757c6 2022-02-02T10:30:34 [repacker] expose hb_subset_repack() API, hb_object_t and hb_link_t structs
luz paz e2e30506 2022-01-16T07:00:53 Fix various typos Found via `codespell -q 3 -S ./perf/texts -L actualy,ba,beng,fo,gir,inout,nd,ot,pres,ro,te,teh,timne`
Behdad Esfahbod 8a69e006 2022-01-13T16:17:34 [meta] Use std::addressof() instead of hb_addressof()
Garret Rieger 39e76af1 2021-11-30T15:25:40 [subset] add all_links () to object_t. Helper to provide easy access to concatenated real and virtual links iterator.
Garret Rieger 9121ed0c 2021-11-30T13:45:22 [subset] Improve sharing of Ligature subtables. Ligature subtables use virtual links to enforce an ordering constraint between the subtables and the coverage table. Unfortunately this has the sideeffect of prevent the subtables from being shared by another Ligature with a different coverage table since object equality compares all links real and virtual. This change makes virtual links stored separately from real links and updates the equality check to only check real links. If an object is de-duped any virtual links it has are merged into the object that replaces it.
Behdad Esfahbod 394f7729 2021-11-19T11:49:23 [map] Allow storing classes in the hashmap Fixes https://github.com/harfbuzz/harfbuzz/issues/3293 The trick was to change the type of the invalid key/value to be non-class.
Garret Rieger 9643d770 2021-09-24T11:39:59 [repacker] add more detailed comment about virtual links.
Garret Rieger 5bfc7d10 2021-09-23T14:45:20 [repacker] remove VirtualOffset struct. Make and add_virtual_link () specialization of add_link() instead.
Garret Rieger bc4c5341 2021-09-23T14:41:42 [repacker] Add test for virtual links in the repacker.
Garret Rieger 7615b94e 2021-09-23T14:14:06 [repacker] add 'virtual links' to the serializer. These aren't associated with an offset field, but instead exist solely to add an ordering constraint to the object graph.
Behdad Esfahbod 943921cf 2021-11-02T00:26:46 [meta] Use more std type_traits
Behdad Esfahbod 6d555ce8 2021-11-02T00:18:22 [meta] Use std::forward instead of hb_forward()
Garret Rieger 2bd911b8 2021-08-26T14:32:17 [subset] handle cmap4 overflows. If a cmap4 subtable overflows during serialization drop it and the corresponding EncodingRecord. Don't drop the corresponding cmap12 table if it would have otherwise been removed.
Behdad Esfahbod 087e2705 2021-07-28T11:42:31 Fix signed-ness error in 0ded6a70c829284a8220ce30a405b0a974061df4
Behdad Esfahbod 0ded6a70 2021-07-28T11:28:38 [subset] Fix another fuzzer issue Addition could overflow on 32bit arch. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36636 Fixes https://oss-fuzz.com/testcase-detail/5072358514753536
Behdad Esfahbod 7b8464b6 2021-07-27T13:15:07 [serialize] Check for overflow in allocate_size() If size was > INT_MAX, then the out-of-room check was failing to perform as intended. Part of fixing https://oss-fuzz.com/testcase-detail/5362189182566400
Behdad Esfahbod 2337f0d0 2021-07-08T10:58:50 Internally use hb_malloc/.../hb_free instead of malloc/.../free Redefining those stock names as macros was conflicting with gcc 10 headers. Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
Behdad Esfahbod bb48bf52 2021-07-08T10:53:45 Rename misc uses of "free" In preparation for fixing https://github.com/harfbuzz/harfbuzz/issues/3044
Garret Rieger 10ad1859 2021-06-16T16:34:46 [subset] add comment to copy_bytes().
Garret Rieger 675ebbeb 2021-06-16T10:40:46 [subset] don't alloc zero bytes. It will be leaked later since hb_blob_create() won't set up the blob to cleanup since it has length zero.
Qunxin Liu b23f29bf 2021-04-17T09:59:45 [subset] Add subset () method for COLRv1 Paint tables, BaseGlyphV1List and LayerV1List Also add support for Offset24 in serializer and repacker
Garret Rieger 9a3537e5 2021-03-29T14:34:24 [subset] invert err() return value. Undo previous change to check_success.
Garret Rieger cdba5d44 2021-03-29T14:23:59 [subset] fix incorrect handling of return value in check_success in the error case.
Garret Rieger 46bf03d6 2021-03-18T14:35:36 [subset] add NODISCARD to error checking methods on serializer.
Garret Rieger 3827a3eb 2021-03-18T11:20:03 [subset] rename serializer::set_error() to err().
Garret Rieger b14475d2 2021-03-18T10:51:26 [subset] further changes to serializer error handling. - Rename enum type and enum members. - in_errors() now returns true for any error having been set. hb-subset now looks for offset overflow only errors to divert to repacker. - Added INT_OVERFLOW and ARRAY_OVERFLOW enum values.
Garret Rieger 73ed59f7 2021-03-17T15:53:10 [subset] store errors in the serializer as a flag set. Make check_assign/check_equal specify the type of error to set.
Garret Rieger b9ecc742 2021-02-16T13:39:10 [subset] init offset_overflow in hb_serialize_context_t.
Garret Rieger 832f2b59 2020-11-10T16:15:37 [subset] Refactor _subset () to reduce nesting and eliminate the use of 'goto'.
Garret Rieger 6b1ea4cb 2020-10-30T12:16:26 [subset] hook up the repacker to run if offset overflows are encountered during subsetting.
Garret Rieger 1584d3cb 2020-10-28T17:49:09 [subset] Start a proof of concept implementation of the GSUB/GPOS offset overflow resolver.
Behdad Esfahbod e5b7bc42 2020-06-29T01:24:02 m Add default value to BEInt<> Size template parameter
Behdad Esfahbod dfa9d7ac 2021-02-11T11:08:52 [minor] Use serializer->propagate_error() to simplify code
Garret Rieger 6f754852 2020-08-11T15:40:47 [ENOMEM] skip asserts in to_bias if serializer is in an error state.
Garret Rieger 040ed094 2020-07-30T15:14:02 [ENOMEM] popragate packed/packed_map errors to the serializer. Will disable further modifications based on a bad state.
Garret Rieger 4cbc7d61 2020-07-30T12:20:31 [ENOMEM] check for unset current in serializer->length().
Garret Rieger 15644ee6 2020-07-29T16:37:39 [ENOMEM] fix memory leak if allocation fails during pop_pack().
Garret Rieger 42237adf 2020-07-29T15:18:25 [ENOMEM] make serializer modification operations no-ops if it's in an error state.
Behdad Esfahbod 2cc85281 2020-04-18T16:29:32 [serializer] Make snapshot()/revert() revert current object links Fixes https://github.com/harfbuzz/harfbuzz/issues/2325
ariza 65f41363 2020-04-01T19:49:18 minor; fixes #2292
ariza 188a0a47 2020-03-07T11:02:36 removed default base; replaced w/ bias if required
blueshade7 4c3af7d4 2020-03-05T15:40:44 add "add_link()" with bias arg issue #2227
ariza 6120f50c 2020-02-19T13:55:39 fix Head with link.bias
ariza e65bff09 2020-02-19T13:38:04 workaround whence_t as bit-field
ariza 1aed6d22 2020-02-19T13:20:29 fix whence=Head; position as 28 bits
ariza 4ca8e0d9 2020-02-19T12:52:18 re-implement Tail; rewrote name table with it
ariza c1313e4b 2020-02-17T17:33:18 minor: undid unintended change
ariza 9c65680b 2020-02-17T16:59:45 rename enums to avoid conflict on win
ariza 555f6f1d 2020-02-17T16:29:40 merge add_link_abs() into add_link()
ariza 017cd945 2020-02-06T16:11:58 added add_link_abs()
ariza 65858463 2020-02-16T17:16:29 pop_pack(share=false) in end_serialize() issue #2177
Michiharu Ariza 39fb57c0 2020-02-16T08:38:41 add share option to pop_pack() (#2176) as a solution for #2164
Behdad Esfahbod d663e28a 2020-02-12T15:41:21 [serialize] Catch signedness overflows in check_assign() Should address https://github.com/harfbuzz/harfbuzz/pull/2163#pullrequestreview-355137936
Ebrahim Byagowi 486754a8 2019-09-23T23:48:08 [serialize] Extract iterable copy, copy_all
Ebrahim Byagowi 22b6c6a5 2019-09-24T12:06:28 [serialize] use for each as #resolve_links, format
Qunxin Liu 512551f2 2019-09-23T17:28:16 memory leak fix in serializer (#1988)
Behdad Esfahbod 1c56b5d1 2019-06-17T14:23:04 [serialize] Fix copy() calling operator= https://github.com/googlefonts/harfbuzz/commit/9f610ae239a11e86f94621e26bc15849b65ce41b#commitcomment-33944686
Behdad Esfahbod e8b45c19 2019-05-08T16:37:38 [array] Add .copy()
Behdad Esfahbod 83e3eabd 2019-05-07T20:58:43 Whitespace
Behdad Esfahbod 5c0f62ad 2019-05-07T17:23:46 [serializer] Accept pointer & reference in more methods
Behdad Esfahbod 839618de 2019-05-07T17:21:27 [serializer] Minor
Behdad Esfahbod fa8c4ba8 2019-05-07T14:26:03 Minor
Behdad Esfahbod 52f6c04c 2019-05-07T13:45:48 Minor
Behdad Esfahbod 2eb7e0e0 2019-05-07T12:45:38 [serialize] Minor
Behdad Esfahbod 1c81cff2 2019-05-07T11:51:10 Fix signed-comparison error on 32bit
Behdad Esfahbod e6a622b5 2019-05-07T11:06:43 [serialize] Enable bias assertion
Behdad Esfahbod 530ddbbc 2019-05-07T11:05:51 [serialize] Use range-based loop
Behdad Esfahbod 240f57e5 2019-05-06T23:17:39 Rename hb_deref_pointer() to hb_deref()
Behdad Esfahbod 431b6e1c 2019-05-02T16:22:32 [serialize] Disable assertion for now
Behdad Esfahbod 8a32c9ee 2019-05-02T16:20:18 [serialize] Misc getting copy() to work
Behdad Esfahbod 91176d5b 2019-05-02T15:12:07 [serialize] Check offset base is within (possibly end of) object