[Libreoffice-commits] core.git: external/harfbuzz
Stephan Bergmann
sbergman at redhat.com
Tue May 19 06:28:34 PDT 2015
external/harfbuzz/UnpackedTarball_harfbuzz.mk | 4 +++
external/harfbuzz/ubsan.patch | 32 ++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
New commits:
commit fd2c99e473fabf811a909be9b11b7dbe19f2814e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue May 19 15:27:51 2015 +0200
external/harfbuzz: work around -fsanitize=function
Change-Id: I8e107c155a99fd68b0aa054435bc85246444b3c6
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index 5450a81..9a5560f 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -13,6 +13,10 @@ $(eval $(call gb_UnpackedTarball_set_tarball,harfbuzz,$(HARFBUZZ_TARBALL),,harfb
$(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
+$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
+ external/harfbuzz/ubsan.patch \
+))
+
ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
external/harfbuzz/harfbuzz-rtti.patch \
diff --git a/external/harfbuzz/ubsan.patch b/external/harfbuzz/ubsan.patch
new file mode 100644
index 0000000..1375c9d
--- /dev/null
+++ b/external/harfbuzz/ubsan.patch
@@ -0,0 +1,32 @@
+--- src/hb-ot-map-private.hh
++++ src/hb-ot-map-private.hh
+@@ -52,8 +52,11 @@
+ unsigned int needs_fallback : 1;
+ unsigned int auto_zwj : 1;
+
+- static int cmp (const feature_map_t *a, const feature_map_t *b)
+- { return a->tag < b->tag ? -1 : a->tag > b->tag ? 1 : 0; }
++ static int cmp (void const * a_, void const * b_) {
++ feature_map_t const * a = static_cast<feature_map_t const *>(a_);
++ feature_map_t const * b = static_cast<feature_map_t const *>(b_);
++ return a->tag < b->tag ? -1 : a->tag > b->tag ? 1 : 0;
++ }
+ };
+
+ struct lookup_map_t {
+--- src/hb-ot-tag.cc
++++ src/hb-ot-tag.cc
+@@ -778,9 +778,11 @@
+ };
+
+ static int
+-lang_compare_first_component (const char *a,
+- const char *b)
++lang_compare_first_component (void const * a_,
++ void const * b_)
+ {
++ char const * a = static_cast<char const *>(a_);
++ char const * b = static_cast<char const *>(b_);
+ unsigned int da, db;
+ const char *p;
+
More information about the Libreoffice-commits
mailing list