[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Sun Oct 14 22:21:18 UTC 2018


 src/hb-ot-kern-table.hh |    1 +
 src/hb.hh               |    9 +++++++++
 2 files changed, 10 insertions(+)

New commits:
commit 62376a7d983442408059b0b8987e7ca8d1de154e
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Oct 14 15:20:50 2018 -0700

    Ignore signed-integer-overflow while kerning
    
    Fixes https://github.com/harfbuzz/harfbuzz/issues/1247

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
diff --git a/src/hb.hh b/src/hb.hh
index 5d0396a6..098b5660 100644
--- a/src/hb.hh
+++ b/src/hb.hh
@@ -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,


More information about the HarfBuzz mailing list