aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Garret Rieger <grieger@google.com>2018-03-21 12:03:55 -0600
committerGravatar Max Moroz <dor3s1@gmail.com>2018-03-21 11:03:55 -0700
commit091d1197d25c6de503c07cc26978555f2662e691 (patch)
tree2958994da4a3035c50aed5f90ee5585c975498ea
parentc7a2de6aac6e8aefbc662be4c177d1a76b51bf33 (diff)
[harfbuzz] Update harfbuzz fuzzer config to include new hb-subset-fuzzer target. (#1260)
-rw-r--r--projects/harfbuzz/Dockerfile2
-rwxr-xr-xprojects/harfbuzz/build.sh12
-rw-r--r--projects/harfbuzz/hb-shape-fuzzer.options (renamed from projects/harfbuzz/hb-fuzzer.options)0
-rw-r--r--projects/harfbuzz/project.yaml1
4 files changed, 10 insertions, 5 deletions
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-shape-fuzzer.options
index ea2a7a23..ea2a7a23 100644
--- a/projects/harfbuzz/hb-fuzzer.options
+++ b/projects/harfbuzz/hb-shape-fuzzer.options
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: