.circleci/config.yml | 2 - TODO | 2 - appveyor.yml | 15 ++++++++++ src/hb-aat-layout-common.hh | 2 - src/hb-aat-layout-kerx-table.hh | 5 ++- src/hb-blob.cc | 6 ++-- test/api/test-font.c | 2 + test/fuzzing/fonts/clusterfuzz-testcase-hb-shape-fuzzer-5688420752424960 |binary test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-shape-fuzzer-5688420752424960 |binary test/fuzzing/run-shape-fuzzer-tests.py | 4 ++ util/options.hh | 2 - 11 files changed, 29 insertions(+), 11 deletions(-)
New commits: commit 68b705076808d4b0a4ac3bfa945b8f9ae23db1df Author: Behdad Esfahbod <beh...@behdad.org> Date: Sat Oct 20 12:09:41 2018 -0700 [kerx] Fix sanitize of KerxSubtableFormat2::array read Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11033 diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index 64257809..e8eb43b8 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -103,7 +103,8 @@ struct KerxSubTableFormat0 inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (likely (pairs.sanitize (c))); + return_trace (likely (c->check_struct (this) && + pairs.sanitize (c))); } protected: @@ -275,7 +276,7 @@ struct KerxSubTableFormat2 inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (likely (rowWidth.sanitize (c) && + return_trace (likely (c->check_struct (this) && leftClassTable.sanitize (c, this) && rightClassTable.sanitize (c, this) && c->check_range (this, array))); commit 00fdbca4f6a5c4623b9c4838da502cccce8aaa74 Author: Behdad Esfahbod <beh...@behdad.org> Date: Sat Oct 20 12:04:51 2018 -0700 [aat] Fix LookupFormat10 sanitize Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11060 diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 60724c18..a99ccaf9 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -285,7 +285,7 @@ struct LookupFormat10 valueArrayZ; /* The lookup values (indexed by the glyph index * minus the value of firstGlyph). */ public: - DEFINE_SIZE_ARRAY (6, valueArrayZ); + DEFINE_SIZE_ARRAY (8, valueArrayZ); }; template <typename T> commit f11c557662dee16a59bb54276c50a96e4e675201 Author: Behdad Esfahbod <beh...@behdad.org> Date: Sat Oct 20 11:56:30 2018 -0700 [test] Fix leak diff --git a/test/api/test-font.c b/test/api/test-font.c index 728f9b96..5ceb131a 100644 --- a/test/api/test-font.c +++ b/test/api/test-font.c @@ -426,6 +426,8 @@ test_fontfuncs_parallels (void) /* Just test that calling get_nominal_glyph doesn't infinite-loop. */ hb_codepoint_t glyph; hb_font_get_nominal_glyph (font2, 0x0020u, &glyph); + + hb_font_destroy (font2); } static void commit 440a675c7cc72c7c77b4ad7b20c855c53808ef48 Author: Ebrahim Byagowi <ebra...@gnu.org> Date: Sat Oct 20 21:13:25 2018 +0330 [TODO] Remove BCP 47 language handling item Closes https://github.com/harfbuzz/harfbuzz/issues/1286 diff --git a/TODO b/TODO index d2c5812a..d8e41050 100644 --- a/TODO +++ b/TODO @@ -15,8 +15,6 @@ API additions - Add sanitize API. -- BCP 47 language handling / API (language_matches?) - - Add query / enumeration API for aalt-like features? - Add segmentation API commit d39acc5a95f968b0dbfd5a942abda606d9aa3343 Author: Ebrahim Byagowi <ebra...@gnu.org> Date: Sat Oct 20 12:20:30 2018 +0330 [fuzzing] Add new testcases diff --git a/test/fuzzing/fonts/clusterfuzz-testcase-hb-shape-fuzzer-5688420752424960 b/test/fuzzing/fonts/clusterfuzz-testcase-hb-shape-fuzzer-5688420752424960 new file mode 100644 index 00000000..1fe962b8 Binary files /dev/null and b/test/fuzzing/fonts/clusterfuzz-testcase-hb-shape-fuzzer-5688420752424960 differ diff --git a/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-shape-fuzzer-5688420752424960 b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-shape-fuzzer-5688420752424960 new file mode 100644 index 00000000..e9f01a23 Binary files /dev/null and b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-shape-fuzzer-5688420752424960 differ commit 1e55e21dea78aaaddc0715e7df96fd198ec8f78a Merge: 964ae32a d084719f Author: Ebrahim Byagowi <ebra...@gnu.org> Date: Sat Oct 20 07:45:46 2018 +0330 Merge pull request #1283 from khaledhosny/cygwin Cygwin fixes and CI build commit 964ae32aac793540a49c44efab878592394d48db Author: Ebrahim Byagowi <ebra...@gnu.org> Date: Sat Oct 20 07:39:18 2018 +0330 Run valgrind on run-shape-fuzzer only when RUN_VALGRIND is set (#1285) diff --git a/.circleci/config.yml b/.circleci/config.yml index d661a14e..e73f53ca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -102,7 +102,7 @@ jobs: - run: make -j32 # run-shape-fuzzer-tests.py automatically runs valgrind if see available # but test/api runs it by request, we probably should normalize the approaches - - run: make check && make -Ctest/api check-valgrind || .ci/fail.sh + - run: RUN_VALGRIND=1 make check && make -Ctest/api check-valgrind || .ci/fail.sh # informational for now - run: make -Ctest/api check-symbols || true diff --git a/test/fuzzing/run-shape-fuzzer-tests.py b/test/fuzzing/run-shape-fuzzer-tests.py index dcdab671..53c4f501 100755 --- a/test/fuzzing/run-shape-fuzzer-tests.py +++ b/test/fuzzing/run-shape-fuzzer-tests.py @@ -67,7 +67,9 @@ please provide it as the first argument to the tool""") print ('hb_shape_fuzzer:', hb_shape_fuzzer) fails = 0 -valgrind = which ('valgrind') +valgrind = None +if os.environ.get('RUN_VALGRIND', ''): + valgrind = which ('valgrind') parent_path = os.path.join (srcdir, "fonts") for file in os.listdir (parent_path): commit d084719ff5a9e0e363bf352037f85b884bff11a7 Author: Khaled Hosny <khaledho...@eglug.org> Date: Sat Oct 20 00:18:36 2018 +0200 Add Cygwin CI build Fixes https://github.com/harfbuzz/harfbuzz/issues/1274 diff --git a/appveyor.yml b/appveyor.yml index f10078fd..bf982199 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,9 +28,19 @@ environment: MINGW_CHOST: i686-w64-mingw32 MSYS2_ARCH: i686 + - compiler: cygwin + CYGWIN_PREFIX: C:\Cygwin64 + CYGWIN_ARCH: x86_64 + # Lots of test failures here! + #- compiler: cygwin + # CYGWIN_PREFIX: C:\Cygwin + # CYGWIN_ARCH: x86 + + install: - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "pacman --force --noconfirm -Sy && pacman --noconfirm --force -S pacman-mirrors && pacman --force -Syu --noconfirm"' - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-x86_64-ragel" + - 'if "%compiler%"=="cygwin" %CYGWIN_PREFIX%\setup-%CYGWIN_ARCH%.exe -g -q -P cygwin-devel,libfreetype-devel,libcairo-devel,libicu-devel,gcc,gcc-g++,gobject-introspection,libglib2.0-devel,libgraphite2-devel,pkg-config,python2' build_script: - 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" vcpkg install glib:%triplet% freetype:%triplet% cairo:%triplet%' @@ -49,8 +59,13 @@ build_script: - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "curl https://raw.githubusercontent.com/mirror/mingw-w64/023eb04c396d4e8d8fcf604cfababc53dae13398/mingw-w64-headers/include/dwrite_1.h > %MINGW_PREFIX%/%MINGW_CHOST%/include/dwrite_1.h"' - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --with-directwrite --build=%MINGW_CHOST% --host=%MINGW_CHOST% --prefix=%MINGW_PREFIX%; make; make check || .ci/fail.sh"' + - 'if "%compiler%"=="cygwin" set PATH=%PATH%;c:\msys64\mingw64\bin' # msys2 is added just for having "ragel" on PATH + - 'if "%compiler%"=="cygwin" curl https://raw.githubusercontent.com/mirror/mingw-w64/023eb04c396d4e8d8fcf604cfababc53dae13398/mingw-w64-headers/include/dwrite_1.h -o %CYGWIN_PREFIX%\usr\include\dwrite_1.h' + - 'if "%compiler%"=="cygwin" %CYGWIN_PREFIX%\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --with-directwrite; make; make check || .ci/fail.sh"' + cache: - c:\tools\vcpkg\installed\ + - '%CYGWIN_PREFIX%\var\cache\setup' notifications: - provider: Email commit cf92cb7e002f479505fed8c2c55ab12dcbea2d83 Author: Khaled Hosny <khaledho...@eglug.org> Date: Fri Oct 19 22:21:39 2018 +0200 Use g_strdup instead of strdup Cygwin does not seem to have strdup. diff --git a/util/options.hh b/util/options.hh index 3749b99b..dd628590 100644 --- a/util/options.hh +++ b/util/options.hh @@ -586,7 +586,7 @@ struct output_options_t : option_group_t if (output_format) { output_format++; /* skip the dot */ - output_format = strdup (output_format); + output_format = g_strdup (output_format); } } commit 30cbe6158de1ddc0546d55e4edc1fe264e1b86ef Author: Khaled Hosny <khaledho...@eglug.org> Date: Fri Oct 19 22:04:56 2018 +0200 Use O_BINARY instead of _O_BINARY Cygwin does not seem to have the later diff --git a/src/hb-blob.cc b/src/hb-blob.cc index edee6730..368491c0 100644 --- a/src/hb-blob.cc +++ b/src/hb-blob.cc @@ -487,8 +487,8 @@ hb_blob_t::try_make_writable (void) #if defined(_WIN32) || defined(__CYGWIN__) # include <windows.h> #else -# ifndef _O_BINARY -# define _O_BINARY 0 +# ifndef O_BINARY +# define O_BINARY 0 # endif #endif @@ -540,7 +540,7 @@ hb_blob_create_from_file (const char *file_name) hb_mapped_file_t *file = (hb_mapped_file_t *) calloc (1, sizeof (hb_mapped_file_t)); if (unlikely (!file)) return hb_blob_get_empty (); - int fd = open (file_name, O_RDONLY | _O_BINARY, 0); + int fd = open (file_name, O_RDONLY | O_BINARY, 0); if (unlikely (fd == -1)) goto fail_without_close; struct stat st; _______________________________________________ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/harfbuzz