diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2018-10-14 15:20:50 -0700 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2018-10-14 15:20:50 -0700 |
commit | 62376a7d983442408059b0b8987e7ca8d1de154e (patch) | |
tree | 14540bd8a98ffef95ce5a6f4cd0f32f2b5870c0d | |
parent | 40f2b9355cf827c7b82ea5e55b112ce0032a9abf (diff) |
Ignore signed-integer-overflow while kerning
Fixes https://github.com/harfbuzz/harfbuzz/issues/1247
-rw-r--r-- | src/hb-ot-kern-table.hh | 1 | ||||
-rw-r--r-- | src/hb.hh | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/hb-ot-kern-table.hh b/src/hb-ot-kern-table.hh index dab7a805..3cc11d10 100644 --- a/src/hb-ot-kern-table.hh +++ b/src/hb-ot-kern-table.hh @@ -37,6 +37,7 @@ struct hb_kern_machine_t { hb_kern_machine_t (const Driver &driver_) : driver (driver_) {} + HB_NO_SANITIZE_SIGNED_INTEGER_OVERFLOW inline void kern (hb_font_t *font, hb_buffer_t *buffer, hb_mask_t kern_mask) const @@ -237,6 +237,15 @@ struct _hb_alignof # define HB_FALLTHROUGH /* FALLTHROUGH */ #endif +#if defined(__clang__) +/* Disable certain sanitizer errors. */ +/* https://github.com/harfbuzz/harfbuzz/issues/1247 */ +#define HB_NO_SANITIZE_SIGNED_INTEGER_OVERFLOW __attribute__((no_sanitize("signed-integer-overflow"))) +#else +#define HB_NO_SANITIZE_SIGNED_INTEGER_OVERFLOW +#endif + + #if defined(_WIN32) || defined(__CYGWIN__) /* We need Windows Vista for both Uniscribe backend and for * MemoryBarrier. We don't support compiling on Windows XP, |