[HarfBuzz] harfbuzz: Branch 'master' - 13 commits

2018-09-30 Thread Behdad Esfahbod
 .circleci/config.yml  |   43 +++---
 src/hb-buffer.cc  |2 +
 src/hb-buffer.hh  |3 +-
 src/hb-common.cc  |7 ++
 src/hb-common.h   |4 +--
 src/hb-font.cc|   12 ++
 src/hb-ft.cc  |   19 
 src/hb-ot-font.cc |   22 ---
 src/hb-ot-layout.hh   |   12 --
 src/hb-ot-map.hh  |2 +
 src/hb-ot-shape-complex-arabic.cc |3 ++
 src/hb-ot-shape-complex-indic.cc  |   34 +++---
 src/hb-ot-shape-complex-khmer.cc  |   18 +++
 test/api/test-multithread.c   |2 -
 util/options.cc   |   12 +-
 util/options.hh   |   34 +++---
 16 files changed, 117 insertions(+), 112 deletions(-)

New commits:
commit 89ed040b21b366c927199bedd0e4cb060389d076
Author: Behdad Esfahbod 
Date:   Sun Sep 30 06:06:26 2018 -0400

[util] Fix more non-virtual-destructor warnings

diff --git a/util/options.hh b/util/options.hh
index 1a26697d..4d920ad0 100644
--- a/util/options.hh
+++ b/util/options.hh
@@ -67,7 +67,8 @@ struct option_group_t
 
 struct option_parser_t
 {
-  option_parser_t (const char *usage) {
+  option_parser_t (const char *usage)
+  {
 memset (this, 0, sizeof (*this));
 usage_str = usage;
 context = g_option_context_new (usage);
@@ -75,7 +76,8 @@ struct option_parser_t
 
 add_main_options ();
   }
-  ~option_parser_t (void) {
+  virtual ~option_parser_t (void)
+  {
 g_option_context_free (context);
 g_ptr_array_foreach (to_free, (GFunc) g_free, nullptr);
 g_ptr_array_free (to_free, TRUE);
@@ -115,7 +117,8 @@ struct option_parser_t
 
 struct view_options_t : option_group_t
 {
-  view_options_t (option_parser_t *parser) {
+  view_options_t (option_parser_t *parser)
+  {
 annotate = false;
 fore = nullptr;
 back = nullptr;
@@ -124,7 +127,7 @@ struct view_options_t : option_group_t
 
 add_options (parser);
   }
-  ~view_options_t (void)
+  virtual ~view_options_t (void)
   {
 g_free (fore);
 g_free (back);
@@ -159,7 +162,7 @@ struct shape_options_t : option_group_t
 
 add_options (parser);
   }
-  ~shape_options_t (void)
+  virtual ~shape_options_t (void)
   {
 g_free (direction);
 g_free (language);
@@ -463,7 +466,8 @@ struct font_options_t : option_group_t
 
 add_options (parser);
   }
-  ~font_options_t (void) {
+  virtual ~font_options_t (void)
+  {
 g_free (font_file);
 free (variations);
 g_free (font_funcs);
@@ -496,7 +500,8 @@ struct font_options_t : option_group_t
 
 struct text_options_t : option_group_t
 {
-  text_options_t (option_parser_t *parser) {
+  text_options_t (option_parser_t *parser)
+  {
 text_before = nullptr;
 text_after = nullptr;
 
@@ -510,7 +515,8 @@ struct text_options_t : option_group_t
 
 add_options (parser);
   }
-  ~text_options_t (void) {
+  virtual ~text_options_t (void)
+  {
 g_free (text_before);
 g_free (text_after);
 g_free (text);
@@ -548,7 +554,8 @@ struct text_options_t : option_group_t
 struct output_options_t : option_group_t
 {
   output_options_t (option_parser_t *parser,
-   const char **supported_formats_ = nullptr) {
+   const char **supported_formats_ = nullptr)
+  {
 output_file = nullptr;
 output_format = nullptr;
 supported_formats = supported_formats_;
@@ -558,7 +565,8 @@ struct output_options_t : option_group_t
 
 add_options (parser);
   }
-  ~output_options_t (void) {
+  virtual ~output_options_t (void)
+  {
 g_free (output_file);
 g_free (output_format);
 if (fp)
commit 2382dd07fa6ff49638b146a523e9d2e93cf69ceb
Author: Behdad Esfahbod 
Date:   Sun Sep 30 05:54:47 2018 -0400

Minor

diff --git a/util/options.hh b/util/options.hh
index 0c929a22..1a26697d 100644
--- a/util/options.hh
+++ b/util/options.hh
@@ -56,12 +56,12 @@ void fail (hb_bool_t suggest_help, const char *format, ...) 
G_GNUC_NORETURN G_GN
 
 struct option_group_t
 {
-  virtual ~option_group_t () {}
+  virtual ~option_group_t (void) {}
 
   virtual void add_options (struct option_parser_t *parser) = 0;
 
-  virtual void pre_parse (GError **error G_GNUC_UNUSED) {};
-  virtual void post_parse (GError **error G_GNUC_UNUSED) {};
+  virtual void pre_parse (GError **error G_GNUC_UNUSED) {}
+  virtual void post_parse (GError **error G_GNUC_UNUSED) {}
 };
 
 
commit 9caa432d0c5c09c8151cfce1e2cc184fbdd89594
Author: Behdad Esfahbod 
Date:   Sun Sep 30 05:49:08 2018 -0400

[util] Use HB_FALLTHROUGH

Sure, gcc knows to warn about this as well:

../../util/options.cc:175:17: warning: this statement may fall through 
[-Wimplicit-fallthrough=]
 case 1: m.r = m.t;
 ^
../../util/options.cc:176:5: note: here
 case 2: m.b = m.t;
 ^~~~
  

[HarfBuzz] harfbuzz: Branch 'master'

2018-09-30 Thread Behdad Esfahbod
 util/options.hh |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b5285b34798cb7ee672343d00cbe066ea8a2ef83
Author: Behdad Esfahbod 
Date:   Sun Sep 30 12:23:01 2018 +0200

[util] Remove unneeded virtual

clang warning:

../../util/options.hh:72:13: warning: destination for this 'memset' call is 
a pointer to dynamic class
  'option_parser_t'; vtable pointer will be overwritten 
[-Wdynamic-class-memaccess]
memset (this, 0, sizeof (*this));
~~  ^
../../util/options.hh:72:13: note: explicitly cast the pointer to silence 
this warning
memset (this, 0, sizeof (*this));
^
(void*)

diff --git a/util/options.hh b/util/options.hh
index 4d920ad0..40e1ab89 100644
--- a/util/options.hh
+++ b/util/options.hh
@@ -76,7 +76,7 @@ struct option_parser_t
 
 add_main_options ();
   }
-  virtual ~option_parser_t (void)
+  ~option_parser_t (void)
   {
 g_option_context_free (context);
 g_ptr_array_foreach (to_free, (GFunc) g_free, nullptr);
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz


[HarfBuzz] harfbuzz: Branch 'master' - 7 commits

2018-09-30 Thread Behdad Esfahbod
 .circleci/config.yml|9 ++---
 src/hb-buffer.h |2 --
 src/hb-ot-shape-fallback.cc |2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 5c65ed800de4caef5ee9ad2111225fa5d8235737
Author: Behdad Esfahbod 
Date:   Sun Sep 30 17:48:55 2018 +0200

Fix bug introduced in 9b0b40b3c1ac8155c80ed5dc976228f4d3ec7e1f

Also discovered by msan bot.

diff --git a/src/hb-ot-shape-fallback.cc b/src/hb-ot-shape-fallback.cc
index 5fec9d87..f7409e8b 100644
--- a/src/hb-ot-shape-fallback.cc
+++ b/src/hb-ot-shape-fallback.cc
@@ -455,7 +455,7 @@ _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan,
   hb_glyph_position_t *pos = buffer->pos;
   for (unsigned int idx = 0; idx < count;)
   {
-if (!(buffer->cur().mask & kern_mask))
+if (!(info[idx].mask & kern_mask))
 {
   idx++;
   continue;
commit 247756a7d89008ee6a7d1171dc07ba22454c6034
Author: Behdad Esfahbod 
Date:   Sun Sep 30 13:10:54 2018 +0200

Fix glib-mkenum warning

  GEN  hb-gobject-enums.h
WARNING: Failed to parse "/*< private >*/" in ../../src/hb-buffer.h

diff --git a/src/hb-buffer.h b/src/hb-buffer.h
index 4ed458fb..7d60b4f1 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -62,9 +62,7 @@ HB_BEGIN_DECLS
 typedef struct hb_glyph_info_t
 {
   hb_codepoint_t codepoint;
-  /*< private >*/
   hb_mask_t  mask;
-  /*< public >*/
   uint32_t   cluster;
 
   /*< private >*/
commit 0a89f9572fe2d0d9fbf0297e0a69307f0ba1a17c
Author: Ebrahim Byagowi 
Date:   Sun Sep 30 17:44:15 2018 +0330

[circleci] Pass ‌freetype compile flags to right place

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 486a7c35..8bf23250 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -125,7 +125,7 @@ jobs:
   - run: pip install fonttools
   - run: update-alternatives --install "/usr/bin/ld" "ld" 
"/usr/bin/ld.lld" 10
   - run: wget 
https://ftp.gnome.org/pub/gnome/sources/glib/2.28/glib-2.28.0.tar.bz2 && tar xf 
glib-2.28.0.tar.bz2 && cd glib-2.28.0 && ./autogen.sh || true && ./configure 
CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory" 
CFLAGS="-fsanitize=memory" CXXFLAGS="-fsanitize=memory" LD=ld.lld CC=clang 
CXX=clang++ && make -j32 && make install && cd ..
-  - run: wget 
http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar 
xf freetype-2.9.tar.bz2 && cd freetype-2.9 && CPPFLAGS="-fsanitize=memory" 
LDFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" 
CFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" 
CXXFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang 
CXX=clang++ ./autogen.sh && ./configure && make -j32 && make install && cd ..
+  - run: wget 
http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar 
xf freetype-2.9.tar.bz2 && cd freetype-2.9 && ./autogen.sh && ./configure 
CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ && make -j32 && make 
install && cd ..
   - run: CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh 
--with-freetype --with-glib --with-cairo --with-icu --with-graphite2
   - run: make -j32
   - run: MSAN_OPTIONS=exitcode=42 make check --ignore-errors
commit ad701f05cc86c22e8e53b7f5458887457e3a5e5f
Author: Ebrahim Byagowi 
Date:   Sun Sep 30 17:30:42 2018 +0330

[circleci] Use an instrumented freetype on msan bot

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 6dd605aa..486a7c35 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -125,10 +125,12 @@ jobs:
   - run: pip install fonttools
   - run: update-alternatives --install "/usr/bin/ld" "ld" 
"/usr/bin/ld.lld" 10
   - run: wget 
https://ftp.gnome.org/pub/gnome/sources/glib/2.28/glib-2.28.0.tar.bz2 && tar xf 
glib-2.28.0.tar.bz2 && cd glib-2.28.0 && ./autogen.sh || true && ./configure 
CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory" 
CFLAGS="-fsanitize=memory" CXXFLAGS="-fsanitize=memory" LD=ld.lld CC=clang 
CXX=clang++ && make -j32 && make install && cd ..
-  - run: wget 
http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar 
xf freetype-2.9.tar.bz2 && cd freetype-2.9 && CPPFLAGS="-fsanitize=memory" 
LDFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" 
CFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" 
CXXFLAGS="-fsanitize=memory -O1 -g -fno-omit-frame-pointer" LD=ld.lld CC=clang 
CXX=clang++ ./autogen.sh && ./configure && make -j32 && cd ..
+  - run: wget 
http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar 
xf freetype-2.9.tar.bz2

[HarfBuzz] harfbuzz: Branch 'master' - 7 commits

2018-09-30 Thread Behdad Esfahbod
 .circleci/config.yml|2 +-
 src/hb-blob.cc  |5 -
 src/hb-buffer.h |5 +++--
 src/hb-common.h |8 +---
 src/hb.hh   |4 
 test/api/hb-test.h  |1 +
 test/api/test-blob.c|2 +-
 test/api/test-c.c   |2 +-
 test/api/test-font.c|   16 
 test/api/test-multithread.c |   16 
 test/api/test-ot-color.c|2 +-
 test/api/test-shape.c   |   14 +++---
 test/api/test-unicode.c |   10 +-
 13 files changed, 45 insertions(+), 42 deletions(-)

New commits:
commit dc9b47ae87096d34d146e50e44e742a76861976f
Author: Behdad Esfahbod 
Date:   Sun Sep 30 18:35:12 2018 +0200

[msan] Remove uninstrumented libraries

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 8bf23250..4db6dceb 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -126,7 +126,7 @@ jobs:
   - run: update-alternatives --install "/usr/bin/ld" "ld" 
"/usr/bin/ld.lld" 10
   - run: wget 
https://ftp.gnome.org/pub/gnome/sources/glib/2.28/glib-2.28.0.tar.bz2 && tar xf 
glib-2.28.0.tar.bz2 && cd glib-2.28.0 && ./autogen.sh || true && ./configure 
CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory" 
CFLAGS="-fsanitize=memory" CXXFLAGS="-fsanitize=memory" LD=ld.lld CC=clang 
CXX=clang++ && make -j32 && make install && cd ..
   - run: wget 
http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar 
xf freetype-2.9.tar.bz2 && cd freetype-2.9 && ./autogen.sh && ./configure 
CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ && make -j32 && make 
install && cd ..
-  - run: CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh 
--with-freetype --with-glib --with-cairo --with-icu --with-graphite2
+  - run: CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh 
--with-freetype --with-glib
   - run: make -j32
   - run: MSAN_OPTIONS=exitcode=42 make check --ignore-errors
   # always run fail, till we fix msan "make check" isssue and remove 
--ignore-erros, then we can merge the two lines
commit ad1c190ecfbac66ffeef69db769073a1eed3
Author: Behdad Esfahbod 
Date:   Sun Sep 30 18:26:45 2018 +0200

Correct fix for glib-mkenum warning

diff --git a/src/hb-buffer.h b/src/hb-buffer.h
index 4ed458fb..4c746f40 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -93,8 +93,7 @@ typedef struct hb_glyph_info_t
 typedef enum { /*< flags >*/
   HB_GLYPH_FLAG_UNSAFE_TO_BREAK= 0x0001,
 
-  /*< private >*/
-  HB_GLYPH_FLAG_DEFINED= 0x0001 /* OR of all 
defined flags */
+  HB_GLYPH_FLAG_DEFINED= 0x0001 /*< skip >*/ /* OR 
of all defined flags */
 } hb_glyph_flags_t;
 
 HB_EXTERN hb_glyph_flags_t
commit 1dd1e56bf42af5b11afc3e34f78869e93d39867e
Author: Behdad Esfahbod 
Date:   Sun Sep 30 18:25:58 2018 +0200

Revert "Fix glib-mkenum warning"

This reverts commit 247756a7d89008ee6a7d1171dc07ba22454c6034.

Was wrong.  Right fix coming.

diff --git a/src/hb-buffer.h b/src/hb-buffer.h
index 7d60b4f1..4ed458fb 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -62,7 +62,9 @@ HB_BEGIN_DECLS
 typedef struct hb_glyph_info_t
 {
   hb_codepoint_t codepoint;
+  /*< private >*/
   hb_mask_t  mask;
+  /*< public >*/
   uint32_t   cluster;
 
   /*< private >*/
commit 3f08750fa6772e7e342b96192b84cb9963f7335b
Author: Behdad Esfahbod 
Date:   Sun Sep 30 18:23:34 2018 +0200

Move _POSIX_SOURCE to hb.hh

diff --git a/src/hb-blob.cc b/src/hb-blob.cc
index f0952665..c1ed0f2a 100644
--- a/src/hb-blob.cc
+++ b/src/hb-blob.cc
@@ -25,11 +25,6 @@
  * Red Hat Author(s): Behdad Esfahbod
  */
 
-/* 
http://www.oracle.com/technetwork/articles/servers-storage-dev/standardheaderfiles-453865.html
 */
-#ifndef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 200809L
-#endif
-
 #include "hb.hh"
 #include "hb-blob.hh"
 
diff --git a/src/hb.hh b/src/hb.hh
index 631592de..cfe6d68f 100644
--- a/src/hb.hh
+++ b/src/hb.hh
@@ -35,6 +35,10 @@
 #include "config.h"
 #endif
 
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#endif
+
 #include "hb.h"
 #define HB_H_IN
 #ifdef HAVE_OT
commit 90dd255e570bf8ea3436e2f29242068845256e55
Author: Behdad Esfahbod 
Date:   Sun Sep 30 18:19:54 2018 +0200

Change _HB_SCRIPT_MAX_VALUE from 0x to 0x7FFF

Fixes https://git

[HarfBuzz] harfbuzz: Branch 'master'

2018-09-30 Thread Behdad Esfahbod
 .circleci/config.yml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3babb0813c69d2b419f06773f366a44a9ad32cdb
Author: Behdad Esfahbod 
Date:   Sun Sep 30 20:02:30 2018 +0200

[msan] Disable icu explicitly

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 4db6dceb..8581ef65 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -126,7 +126,7 @@ jobs:
   - run: update-alternatives --install "/usr/bin/ld" "ld" 
"/usr/bin/ld.lld" 10
   - run: wget 
https://ftp.gnome.org/pub/gnome/sources/glib/2.28/glib-2.28.0.tar.bz2 && tar xf 
glib-2.28.0.tar.bz2 && cd glib-2.28.0 && ./autogen.sh || true && ./configure 
CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory" 
CFLAGS="-fsanitize=memory" CXXFLAGS="-fsanitize=memory" LD=ld.lld CC=clang 
CXX=clang++ && make -j32 && make install && cd ..
   - run: wget 
http://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 && tar 
xf freetype-2.9.tar.bz2 && cd freetype-2.9 && ./autogen.sh && ./configure 
CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ && make -j32 && make 
install && cd ..
-  - run: CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh 
--with-freetype --with-glib
+  - run: CPPFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" CXXFLAGS="-fsanitize=memory -O1 -g 
-fno-omit-frame-pointer" LD=ld.lld CC=clang CXX=clang++ ./autogen.sh 
--with-freetype --with-glib --without-icu
   - run: make -j32
   - run: MSAN_OPTIONS=exitcode=42 make check --ignore-errors
   # always run fail, till we fix msan "make check" isssue and remove 
--ignore-erros, then we can merge the two lines
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz