.circleci/config.yml | 14 ++++++-------- src/check-symbols.sh | 2 ++ src/hb-aat-layout-common.hh | 2 ++ src/hb-aat-layout-morx-table.hh | 4 ++++ src/hb-cache.hh | 6 ++++-- src/hb-ucdn.cc | 2 ++ test/fuzzing/run-shape-fuzzer-tests.py | 2 ++ test/fuzzing/run-subset-fuzzer-tests.py | 2 ++ util/helper-cairo.cc | 2 ++ 9 files changed, 26 insertions(+), 10 deletions(-)
New commits: commit 98ac01d3b3deb7c7f5411f6f25c6e7588d84b5f9 Author: Behdad Esfahbod <[email protected]> Date: Mon Oct 1 12:10:00 2018 +0200 [morx] Break out if buffer gets into error Was getting stuck not making progress somehow. diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 052aad7f..b0faa1db 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -585,6 +585,8 @@ struct StateTableDriver if (unlikely (!c->transition (this, entry))) break; + if (unlikely (!buffer->successful)) return; + last_was_dont_advance = (entry->flags & context_t::DontAdvance) && buffer->max_ops-- > 0; state = entry->newState; diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index 60d05e61..c58e6744 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -886,6 +886,8 @@ struct Chain (void) c->buffer->message (c->font, "end chain subtable %d", c->lookup_index); + if (unlikely (!c->buffer->successful)) return; + skip: subtable = &StructAfter<ChainSubtable> (*subtable); c->set_lookup_index (c->lookup_index + 1); @@ -942,12 +944,14 @@ struct morx inline void apply (hb_aat_apply_context_t *c) const { + if (unlikely (!c->buffer->successful)) return; c->set_lookup_index (0); const Chain *chain = &firstChain; unsigned int count = chainCount; for (unsigned int i = 0; i < count; i++) { chain->apply (c); + if (unlikely (!c->buffer->successful)) return; chain = &StructAfter<Chain> (*chain); } } commit df827a6ab88cd8bde346176fc53a5c2d57eee808 Author: Behdad Esfahbod <[email protected]> Date: Mon Oct 1 11:34:20 2018 +0200 [cache] Fix cache coherency corner-case If key_bits+value_bits-cache_bits==32 then -1 is ambiguous... diff --git a/src/hb-cache.hh b/src/hb-cache.hh index ec2e8635..70e966e8 100644 --- a/src/hb-cache.hh +++ b/src/hb-cache.hh @@ -36,7 +36,8 @@ template <unsigned int key_bits, unsigned int value_bits, unsigned int cache_bit struct hb_cache_t { static_assert ((key_bits >= cache_bits), ""); - static_assert ((key_bits + value_bits - cache_bits <= 8 * sizeof (unsigned int)), ""); + static_assert ((key_bits + value_bits - cache_bits <= 8 * sizeof (hb_atomic_int_t)), ""); + static_assert (sizeof (hb_atomic_int_t) == sizeof (unsigned int)); inline void init (void) { clear (); } inline void fini (void) {} @@ -51,7 +52,8 @@ struct hb_cache_t { unsigned int k = key & ((1u<<cache_bits)-1); unsigned int v = values[k].get_relaxed (); - if ((v >> value_bits) != (key >> cache_bits)) + if ((key_bits + value_bits - cache_bits == 8 * sizeof (hb_atomic_int_t) && v == (unsigned int) -1) || + (v >> value_bits) != (key >> cache_bits)) return false; *value = v & ((1u<<value_bits)-1); return true; commit 0fa1edbd3bbf825be078677dc46c3440f9802551 Author: Ebrahim Byagowi <[email protected]> Date: Mon Oct 1 09:40:29 2018 +0330 [circleci] Couple of fixes (#1200) * Raise error on warnings on -everything * Enable fontconfig to two bots * Fix msan bot now that all of its real complain are gone diff --git a/.circleci/config.yml b/.circleci/config.yml index 8581ef65..450b62be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ jobs: - image: ubuntu:17.10 steps: - checkout - - run: apt update && apt install -y ninja-build binutils libtool autoconf automake make cmake gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip + - run: apt update && apt install -y ninja-build binutils libtool autoconf automake make cmake gcc g++ pkg-config ragel gtk-doc-tools libfontconfig1-dev libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip - run: pip install fonttools - run: ./autogen.sh - run: make -j32 @@ -69,13 +69,13 @@ jobs: steps: - checkout - run: apt update || true - - run: apt install -y ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip + - run: apt install -y ragel libfreetype6-dev libfontconfig1-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip - run: pip install fonttools - 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 && make -j32 && cd .. - - run: CFLAGS="-O3" CXXFLAGS="-O3" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 + - run: CFLAGS="-O3" CXXFLAGS="-O3" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-fontconfig --with-glib --with-cairo --with-icu --with-graphite2 - run: make -j32 - run: LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" make check || .ci/fail.sh - - run: CFLAGS="-O0" CXXFLAGS="-O0" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 + - run: CFLAGS="-O0" CXXFLAGS="-O0" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-fontconfig --with-glib --with-cairo --with-icu --with-graphite2 - run: make -j32 - run: LD_LIBRARY_PATH="$PWD/freetype-2.9/objs/.libs" make check || .ci/fail.sh @@ -91,7 +91,7 @@ jobs: - run: apt update || true - run: apt install -y clang lld binutils libtool autoconf automake make pkg-config gtk-doc-tools ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip - run: pip install fonttools - - run: CFLAGS="-Weverything -Wno-padded -Wno-cast-qual -Wno-sign-conversion -Wno-conversion -Wno-documentation -Wno-documentation-unknown-command -Wno-reserved-id-macro" CXXFLAGS="-Weverything -Wno-old-style-cast -Wno-documentation -Wno-documentation-unknown-command -Wno-conversion -Wno-sign-conversion -Wno-c++98-compat -Wno-extra-semi -Wno-c++98-compat-pedantic -Wno-padded -Wno-shift-sign-overflow -Wno-missing-field-initializers -Wno-double-promotion -Wno-reserved-id-macro -Wno-cast-qual -Wno-unused-parameter -Wno-comma -Wno-shadow -Wno-used-but-marked-unused -Wno-format-pedantic -Wno-zero-as-null-pointer-constant -Wno-disabled-macro-expansion -Wno-covered-switch-default -Wno-conditional-uninitialized -Wno-unreachable-code -Wno-unused-macros -Wno-float-equal -Wno-missing-prototypes" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 + - run: CFLAGS="-Weverything -Werror -fPIC -Wno-unused-parameter -Wno-missing-variable-declarations -Wno-padded -Wno-cast-qual -Wno-sign-conversion -Wno-conversion -Wno-documentation -Wno-documentation-unknown-command -Wno-reserved-id-macro -Wno-shadow -Wno-reserved-id-macro -Wno-disabled-macro-expansion -Wno-missing-variable-declarations -Wno-unused-macros -Wno-unreachable-code-return" CXXFLAGS="-Weverything -Werror -fPIC -Wno-undef -Wno-deprecated-declarations -Wno-weak-vtables -Wno-old-style-cast -Wno-documentation -Wno-documentation-unknown-command -Wno-conversion -Wno-sign-conversion -Wno-c++98-compat -Wno-extra-semi -Wno-c++98-compat-pedantic -Wno-padded -Wno-shift-sign-overflow -Wno-missing-field-initializers -Wno-double-promotion -Wno-reserved-id-macro -Wno-cast-qual -Wno-unused-parameter -Wno-comma -Wno-shadow -Wno-used-but-marked-unused -Wno-format-pedantic -Wno-zero-as-null-pointer-constant -Wno-disabled-macro-expansion -Wno-covered-switch-default -Wno-conditional-un initialized -Wno-unreachable-code -Wno-unused-macros -Wno-float-equal -Wno-missing-prototypes" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 - run: make -j32 - run: make check || .ci/fail.sh @@ -128,9 +128,7 @@ jobs: - 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 --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 - - run: .ci/fail.sh | asan_symbolize | c++filt + - run: MSAN_OPTIONS=exitcode=42 SKIPCHECKSYMBOLS=1 SKIPFUZZERTESTS=1 make check || .ci/fail.sh | asan_symbolize | c++filt clang-tsan: docker: diff --git a/src/check-symbols.sh b/src/check-symbols.sh index cea86848..d197e8e3 100755 --- a/src/check-symbols.sh +++ b/src/check-symbols.sh @@ -3,6 +3,8 @@ LC_ALL=C export LC_ALL +test -z "$SKIPCHECKSYMBOLS" || exit 77 + test -z "$srcdir" && srcdir=. test -z "$libs" && libs=.libs stat=0 diff --git a/src/hb-ucdn.cc b/src/hb-ucdn.cc index 624c1eb4..fe45e8f9 100644 --- a/src/hb-ucdn.cc +++ b/src/hb-ucdn.cc @@ -240,7 +240,9 @@ hb_ucdn_decompose_compatibility(hb_unicode_funcs_t *ufuncs HB_UNUSED, } +#ifdef HB_USE_ATEXIT static void free_static_ucdn_funcs (void); +#endif static struct hb_ucdn_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_t<hb_ucdn_unicode_funcs_lazy_loader_t> { diff --git a/test/fuzzing/run-shape-fuzzer-tests.py b/test/fuzzing/run-shape-fuzzer-tests.py index fea0b01b..e87cd09d 100755 --- a/test/fuzzing/run-shape-fuzzer-tests.py +++ b/test/fuzzing/run-shape-fuzzer-tests.py @@ -4,6 +4,8 @@ from __future__ import print_function, division, absolute_import import sys, os, subprocess +if os.environ.get ("SKIPFUZZERTESTS", "") != "": sys.exit (0) + srcdir = os.environ.get ("srcdir", ".") EXEEXT = os.environ.get ("EXEEXT", "") top_builddir = os.environ.get ("top_builddir", ".") diff --git a/test/fuzzing/run-subset-fuzzer-tests.py b/test/fuzzing/run-subset-fuzzer-tests.py index 01362886..aa045fed 100755 --- a/test/fuzzing/run-subset-fuzzer-tests.py +++ b/test/fuzzing/run-subset-fuzzer-tests.py @@ -4,6 +4,8 @@ from __future__ import print_function, division, absolute_import import sys, os, subprocess +if os.environ.get ("SKIPFUZZERTESTS", "") != "": sys.exit (0) + srcdir = os.environ.get ("srcdir", ".") EXEEXT = os.environ.get ("EXEEXT", "") top_builddir = os.environ.get ("top_builddir", ".") diff --git a/util/helper-cairo.cc b/util/helper-cairo.cc index 5914ab74..7a698f30 100644 --- a/util/helper-cairo.cc +++ b/util/helper-cairo.cc @@ -64,11 +64,13 @@ _cairo_eps_surface_create_for_stream (cairo_write_func_t write_func, static FT_Library ft_library; +#ifdef HAVE_ATEXIT static inline void free_ft_library (void) { FT_Done_FreeType (ft_library); } +#endif cairo_scaled_font_t * helper_cairo_create_scaled_font (const font_options_t *font_opts) _______________________________________________ HarfBuzz mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/harfbuzz
