[circleci] Fix "msan" and "everything" bots (#1205)
This commit is contained in:
parent
8bf4027d23
commit
f72b748371
|
@ -91,9 +91,9 @@ jobs:
|
||||||
- run: apt update || true
|
- 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: 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: pip install fonttools
|
||||||
- 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-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 -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 -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-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: make -j32
|
- run: make -j32 CPPFLAGS="-Werror"
|
||||||
- run: make check || .ci/fail.sh
|
- run: make check CPPFLAGS="-Werror" || .ci/fail.sh
|
||||||
|
|
||||||
clang-asan:
|
clang-asan:
|
||||||
docker:
|
docker:
|
||||||
|
@ -121,14 +121,13 @@ jobs:
|
||||||
- run: echo "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdev.list
|
- run: echo "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdev.list
|
||||||
- run: echo "deb-src http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdevsrc.list
|
- run: echo "deb-src http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdevsrc.list
|
||||||
- run: apt update || true
|
- run: apt update || true
|
||||||
- run: apt install -y clang lld binutils libtool autoconf automake automake1.11 gtk-doc-tools gettext make pkg-config ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
|
- run: apt install -y clang lld binutils libtool autoconf automake gtk-doc-tools gettext make pkg-config ragel libcairo2-dev libicu-dev libmount-dev libgraphite2-dev python python-pip
|
||||||
- run: pip install fonttools
|
- run: pip install fonttools
|
||||||
- run: update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.lld" 10
|
- 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 https://ftp.gnome.org/pub/gnome/sources/glib/2.58/glib-2.58.1.tar.xz && tar xf glib-2.58.1.tar.xz && cd glib-2.58.1 && ./autogen.sh --with-pcre 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: 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: 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: make -j32 && MSAN_OPTIONS=exitcode=42 make check || .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:
|
clang-tsan:
|
||||||
docker:
|
docker:
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
test -z "$SKIPCHECKSYMBOLS" || exit 77
|
|
||||||
|
|
||||||
test -z "$srcdir" && srcdir=.
|
test -z "$srcdir" && srcdir=.
|
||||||
test -z "$libs" && libs=.libs
|
test -z "$libs" && libs=.libs
|
||||||
stat=0
|
stat=0
|
||||||
|
|
|
@ -1,21 +1,17 @@
|
||||||
#include "hb-fuzzer.hh"
|
#include "hb-fuzzer.hh"
|
||||||
|
|
||||||
#include <iostream>
|
#include <stdio.h>
|
||||||
#include <iterator>
|
|
||||||
#include <fstream>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
std::string FileToString(const std::string &Path) {
|
|
||||||
/* TODO This silently passes if file does not exist. Fix it! */
|
|
||||||
std::ifstream T(Path.c_str());
|
|
||||||
return std::string((std::istreambuf_iterator<char>(T)),
|
|
||||||
std::istreambuf_iterator<char>());
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
hb_blob_t *blob = hb_blob_create_from_file (argv[1]);
|
||||||
|
unsigned int len;
|
||||||
|
const char *font_data = hb_blob_get_data (blob, &len);
|
||||||
|
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
std::string s = FileToString(argv[i]);
|
printf ("%s\n", argv[i]);
|
||||||
std::cout << argv[i] << std::endl;
|
LLVMFuzzerTestOneInput((const uint8_t *) font_data, len);
|
||||||
LLVMFuzzerTestOneInput((const unsigned char*)s.data(), s.size());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hb_blob_destroy (blob);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,6 @@ from __future__ import print_function, division, absolute_import
|
||||||
|
|
||||||
import sys, os, subprocess
|
import sys, os, subprocess
|
||||||
|
|
||||||
if os.environ.get ("SKIPFUZZERTESTS", "") != "": sys.exit (0)
|
|
||||||
|
|
||||||
srcdir = os.environ.get ("srcdir", ".")
|
srcdir = os.environ.get ("srcdir", ".")
|
||||||
EXEEXT = os.environ.get ("EXEEXT", "")
|
EXEEXT = os.environ.get ("EXEEXT", "")
|
||||||
top_builddir = os.environ.get ("top_builddir", ".")
|
top_builddir = os.environ.get ("top_builddir", ".")
|
||||||
|
|
|
@ -4,8 +4,6 @@ from __future__ import print_function, division, absolute_import
|
||||||
|
|
||||||
import sys, os, subprocess
|
import sys, os, subprocess
|
||||||
|
|
||||||
if os.environ.get ("SKIPFUZZERTESTS", "") != "": sys.exit (0)
|
|
||||||
|
|
||||||
srcdir = os.environ.get ("srcdir", ".")
|
srcdir = os.environ.get ("srcdir", ".")
|
||||||
EXEEXT = os.environ.get ("EXEEXT", "")
|
EXEEXT = os.environ.get ("EXEEXT", "")
|
||||||
top_builddir = os.environ.get ("top_builddir", ".")
|
top_builddir = os.environ.get ("top_builddir", ".")
|
||||||
|
|
Loading…
Reference in New Issue