Commit Graph

6549 Commits

Author SHA1 Message Date
Behdad Esfahbod
be0b2ed316 More warning fixes 2018-09-30 18:02:04 +02:00
Behdad Esfahbod
5c65ed800d Fix bug introduced in 9b0b40b3c1
Also discovered by msan bot.
2018-09-30 17:49:33 +02:00
Behdad Esfahbod
247756a7d8 Fix glib-mkenum warning
GEN      hb-gobject-enums.h
WARNING: Failed to parse "/*< private >*/" in ../../src/hb-buffer.h
2018-09-30 17:49:33 +02:00
Ebrahim Byagowi
0a89f9572f
[circleci] Pass ‌freetype compile flags to right place 2018-09-30 17:44:15 +03:30
Ebrahim Byagowi
ad701f05cc
[circleci] Use an instrumented freetype on msan bot 2018-09-30 17:30:42 +03:30
Ebrahim Byagowi
57aabbc29e
[circleci] Another on fixing msan 2018-09-30 16:31:28 +03:30
Ebrahim Byagowi
24f148df3e
[circleci] minor 2018-09-30 14:46:56 +03:30
Ebrahim Byagowi
0a9aab6722
[circleci] Try to fix msan bot 2018-09-30 14:45:43 +03:30
Behdad Esfahbod
b5285b3479 [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*)
2018-09-30 12:23:01 +02:00
Behdad Esfahbod
89ed040b21 [util] Fix more non-virtual-destructor warnings 2018-09-30 06:08:11 -04:00
Behdad Esfahbod
2382dd07fa Minor 2018-09-30 06:08:11 -04:00
Behdad Esfahbod
9caa432d0c [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;
     ^~~~

But HOLY SMOKES, look at clang -Weverything bot message:

options.cc:176:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
    case 2: m.b = m.t;
    ^
options.cc:176:5: note: insert 'HB_FALLTHROUGH;' to silence this warning
    case 2: m.b = m.t;
    ^
    HB_FALLTHROUGH;

Right, it's telling me to insert "HB_FALLTHROUGH;" there!!!!!!!!!
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
2e728a7d86 [util] Mark var static
From clang -Weverything bot:

options.cc:39:3: warning: no previous extern declaration for non-static variable 'supported_font_funcs' [-Wmissing-variable-declarations]
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
e910a1aef4 [util] Add empty virtual destructor to option_group_t
From clang -Weverything bot:

./options.hh:57:8: warning: 'option_group_t' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
struct option_group_t
       ^
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
b1e07e1e6c [indic/khmer] Remove use of global constructors
Alternative woul have been to resurrect F_COMBINE that I removed in
70136a78cb

But this does it for now.  I'm not sure why check-static-inits.sh didn't
catch this before.  Clang -Weverything bot did:

  CXX      libharfbuzz_la-hb-ot-shape-complex-indic.lo
hb-ot-shape-complex-indic.cc:99:1: warning: declaration requires a global constructor [-Wglobal-constructors]
indic_features[] =
^
1 warning generated.
  CXX      libharfbuzz_la-hb-ot-shape-complex-khmer.lo
hb-ot-shape-complex-khmer.cc:36:1: warning: declaration requires a global constructor [-Wglobal-constructors]
khmer_features[] =
^
1 warning generated.
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
00cd00e641 Tweak HB_TAG and HB_UNTAG
uint32_t was getting promoted to signed int, which is not what we wanted...

Wow, clang has become good at generating warnings...

../../src/hb-common.h:349:29: warning: signed shift result (0xFF000000) sets the sign bit of the shift expression's type ('int') and becomes negative [-Wshift-sign-overflow]
  _HB_SCRIPT_MAX_VALUE                          = HB_TAG_MAX, /*< skip >*/
                                                  ^~~~~~~~~~
../../src/hb-common.h:93:20: note: expanded from macro 'HB_TAG_MAX'
 define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff)
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/hb-common.h:89:57: note: expanded from macro 'HB_TAG'
 define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint8_t)(c1))<<24)|(((uint8_t)(c2))<<16)|(((uint8_t)(c3))<<8)|((uint8_t)(c4))))
                                         ~~~~~~~~~~~~~~~^ ~~
../../src/hb-common.h:349:3: warning: ISO C restricts enumerator values to range of 'int' (4294967295 is too large) [-Wpedantic]
  _HB_SCRIPT_MAX_VALUE                          = HB_TAG_MAX, /*< skip >*/
  ^                                               ~~~~~~~~~~
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
8a31e40629 [font] Make *_advance() fallback to *_advances
And remove redundant implementations.
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
bd07d2878f Use buffer scratch_flags to remember if we had any joiners 2018-09-30 06:08:11 -04:00
Behdad Esfahbod
ba0f0f156f Document setlocale() threadsafety issue
"Fixes" //github.com/harfbuzz/harfbuzz/issues/1191
2018-09-30 06:08:11 -04:00
Ebrahim Byagowi
06be2aa93f
[ci] Build glib and freetype and enable msan bot (#1198) 2018-09-30 00:15:25 +03:30
Ebrahim Byagowi
cefdef0247
Minor on test-multithread, align the actual and expected results 2018-09-29 10:19:54 +03:30
Ebrahim Byagowi
678beff64c
[circleci] Add -Wno-reserved-id-macro to clang-everything 2018-09-29 10:16:14 +03:30
Behdad Esfahbod
c763b94401 [test-multithread] Disable FreeType funcs 2018-09-28 20:53:23 -04:00
Behdad Esfahbod
9b0b40b3c1 Fix fallback kerning to check for current glyph's mask 2018-09-28 20:53:23 -04:00
Ebrahim Byagowi
909a07b587
[circleci] Improve clang-everything bot log, more to come
#1196
2018-09-29 03:10:13 +03:30
Ebrahim Byagowi
9be8062b4d
[ci] Another try on mingw bot 2018-09-29 02:11:05 +03:30
Ebrahim Byagowi
d4d261a977
[ci] Another try on fixing mingw bots
Per https://github.com/Alexpux/MSYS2-packages/issues/163#issuecomment-73555971
2018-09-29 01:57:50 +03:30
Ebrahim Byagowi
7b68edf2ab
[tests] Don't try to get glyph names on failures
As it may cause a race unrelated to the issue actually happened
2018-09-28 20:53:48 +03:30
Ebrahim Byagowi
d289d63818
[ci] Trying to fix mingw bot
As https://github.com/Alexpux/MSYS2-packages/issues/702
2018-09-28 20:47:21 +03:30
Behdad Esfahbod
33231a855f Fix pthread fail for real
Using a hack...
2018-09-28 11:06:49 -04:00
Behdad Esfahbod
8cb8209c91 Fix bot fails 2018-09-28 10:55:28 -04:00
Behdad Esfahbod
f4072e8cb8 [morx] Remove mark_set from Insertion
text-rendering-tests test MORX-32 shows that for Insertion, an unset mark is treated
as mark set at 0.  This is unlike the Reordering lookup where un unset mark performs
nothing.

Fixes MORX-32.
2018-09-28 10:14:23 -04:00
Behdad Esfahbod
0d18ec5467 [morx] unsafe-to-break in Insertion
Makes MORX-29, MORX-30, MORX-31 pass.
2018-09-28 10:01:59 -04:00
Behdad Esfahbod
02bebe42c1 [test/text-rendering-tests] Update from upstream 2018-09-28 10:01:59 -04:00
Behdad Esfahbod
4cd342baea Fix ubsan bot 2018-09-28 09:47:45 -04:00
Behdad Esfahbod
b435df3a5b More atomic tuneup 2018-09-28 09:13:14 -04:00
Behdad Esfahbod
7e6e094abd [test-multithread] Install ot funcs before filling ref buffer 2018-09-28 08:45:57 -04:00
Behdad Esfahbod
21fbee831e [test-multithread] Take num-threads and num-iters from command-line 2018-09-28 08:43:37 -04:00
Behdad Esfahbod
598be3bb38 Minor 2018-09-28 08:43:15 -04:00
Ebrahim Byagowi
c09bf3d505
test-multithread, check the results on every iteration (#1194) 2018-09-28 16:13:01 +03:30
Ebrahim Byagowi
dbc3070a15
Make test-multithread pass the tsan bot test (#1193) 2018-09-28 16:01:15 +03:30
Behdad Esfahbod
d2542cd28c More atomic fixup 2018-09-27 17:23:24 -04:00
Behdad Esfahbod
3ee96984f4 Fixup atomics from recent change 2018-09-27 17:20:26 -04:00
Behdad Esfahbod
305468708d [cache] Use atomic writes in clear()
To help TSan.
2018-09-27 16:54:23 -04:00
Volker Krause
9e9a36ee65 Fix infinite loop when walking up the directory hierarchy (#1183)
A single find_package(harfbuzz) line in user code resulted in this loop
getting stuck when _harfbuzz_libdir_iter became "/".
2018-09-27 18:03:49 +03:30
Ebrahim Byagowi
0c1d852bc4
Use clang for compiling freetype for tsan bot 2018-09-27 11:53:17 +03:30
Behdad Esfahbod
662f7d7e8b [arabic] Do the joiner-flipping only for rlig feature
See comment.
2018-09-26 18:54:09 -04:00
Behdad Esfahbod
7f30629cdd [ft] Make TSan happy 2018-09-26 16:40:59 -04:00
Behdad Esfahbod
ec743fce2a Add more atomic intrinsics 2018-09-26 16:40:59 -04:00
Behdad Esfahbod
d183b33c1d Rename test 2018-09-26 16:40:59 -04:00