From 091d1197d25c6de503c07cc26978555f2662e691 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 21 Mar 2018 12:03:55 -0600 Subject: [harfbuzz] Update harfbuzz fuzzer config to include new hb-subset-fuzzer target. (#1260) --- projects/harfbuzz/Dockerfile | 2 +- projects/harfbuzz/build.sh | 12 ++++++++---- projects/harfbuzz/hb-fuzzer.options | 2 -- projects/harfbuzz/hb-shape-fuzzer.options | 2 ++ projects/harfbuzz/project.yaml | 1 + 5 files changed, 12 insertions(+), 7 deletions(-) delete mode 100644 projects/harfbuzz/hb-fuzzer.options create mode 100644 projects/harfbuzz/hb-shape-fuzzer.options diff --git a/projects/harfbuzz/Dockerfile b/projects/harfbuzz/Dockerfile index ca4ba47c..7de247d6 100644 --- a/projects/harfbuzz/Dockerfile +++ b/projects/harfbuzz/Dockerfile @@ -18,6 +18,6 @@ FROM gcr.io/oss-fuzz-base/base-builder MAINTAINER mmoroz@chromium.org RUN apt-get update && apt-get install -y make autoconf automake libtool ragel pkg-config -RUN git clone --depth 1 https://anongit.freedesktop.org/git/harfbuzz.git +RUN git clone --depth 1 https://github.com/harfbuzz/harfbuzz.git WORKDIR harfbuzz COPY build.sh $SRC/ diff --git a/projects/harfbuzz/build.sh b/projects/harfbuzz/build.sh index 9bb7a887..a8707c9c 100755 --- a/projects/harfbuzz/build.sh +++ b/projects/harfbuzz/build.sh @@ -26,13 +26,17 @@ export CXXFLAGS="$CXXFLAGS -fno-sanitize=function,vptr" ./configure make clean make -j$(nproc) V=1 all -make -C src V=1 fuzzing +make CPPFLAGS="-DHB_NO_VISIBILITY" -C src V=1 fuzzing # Build the fuzzer. $CXX $CXXFLAGS -std=c++11 -Isrc \ - ./test/fuzzing/hb-fuzzer.cc -o $OUT/hb-fuzzer \ + ./test/fuzzing/hb-shape-fuzzer.cc -o $OUT/hb-shape-fuzzer \ -lFuzzingEngine ./src/.libs/libharfbuzz-fuzzing.a -# Archive and copy to $OUT seed corpus if the build succeeded. -zip -j -r $OUT/hb-fuzzer_seed_corpus.zip $SRC/harfbuzz/test/shaping/data/in-house/fonts +$CXX $CXXFLAGS -std=c++11 -Isrc \ + ./test/fuzzing/hb-subset-fuzzer.cc -o $OUT/hb-subset-fuzzer \ + -lFuzzingEngine ./src/.libs/libharfbuzz-subset-fuzzing.a ./src/.libs/libharfbuzz-fuzzing.a +# Archive and copy to $OUT seed corpus if the build succeeded. +zip -j -r $OUT/hb-shape-fuzzer_seed_corpus.zip $SRC/harfbuzz/test/shaping/data/in-house/fonts +zip -j -r $OUT/hb-subset-fuzzer_seed_corpus.zip $SRC/harfbuzz/test/subset/data/fonts $SRC/harfbuzz/test/api/fonts diff --git a/projects/harfbuzz/hb-fuzzer.options b/projects/harfbuzz/hb-fuzzer.options deleted file mode 100644 index ea2a7a23..00000000 --- a/projects/harfbuzz/hb-fuzzer.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -timeout = 5 diff --git a/projects/harfbuzz/hb-shape-fuzzer.options b/projects/harfbuzz/hb-shape-fuzzer.options new file mode 100644 index 00000000..ea2a7a23 --- /dev/null +++ b/projects/harfbuzz/hb-shape-fuzzer.options @@ -0,0 +1,2 @@ +[libfuzzer] +timeout = 5 diff --git a/projects/harfbuzz/project.yaml b/projects/harfbuzz/project.yaml index 91ad6071..5bd1e147 100644 --- a/projects/harfbuzz/project.yaml +++ b/projects/harfbuzz/project.yaml @@ -4,6 +4,7 @@ auto_ccs: - "behdad.esfahbod@gmail.com" - "behdad@google.com" - "ebraminio@gmail.com" + - "grieger@google.com" - "khaledhosny@eglug.org" - "jfkthame@gmail.com" sanitizers: -- cgit v1.2.3