From 6d82dbf32cc68b7e6a4a6138514f0f31b57cd321 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 25 Oct 2018 17:24:24 -0700 Subject: [PATCH] Harfbuzz: a couple of improvements (#1908) * [harfbuzz] Avoid zip duplicate-file-name errors Like this: https://oss-fuzz-build-logs.storage.googleapis.com/log-01068491-8fab-4886-8cc0-477fd26f3db1.txt Copy all font files into one directory (ignoring duplicates), then zip. * [harfbuzz] Remove -fno-sanitize=function Upstream is sanitize=function clean now. --- projects/harfbuzz/build.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/projects/harfbuzz/build.sh b/projects/harfbuzz/build.sh index d088cb444..a802037c7 100755 --- a/projects/harfbuzz/build.sh +++ b/projects/harfbuzz/build.sh @@ -17,8 +17,8 @@ # Disable: # 1. UBSan vptr since target built with -fno-rtti. -export CFLAGS="$CFLAGS -fno-sanitize=function,vptr" -export CXXFLAGS="$CXXFLAGS -fno-sanitize=function,vptr" +export CFLAGS="$CFLAGS -fno-sanitize=vptr" +export CXXFLAGS="$CXXFLAGS -fno-sanitize=vptr" # Build the library. ./autogen.sh @@ -37,5 +37,14 @@ $CXX $CXXFLAGS -std=c++11 -Isrc \ -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 $SRC/harfbuzz/test/shaping/data/text-rendering-tests/fonts $SRC/harfbuzz/test/api/fonts $SRC/harfbuzz/test/fuzzing/fonts +mkdir all-fonts +for d in \ + test/shaping/data/in-house/fonts \ + test/shaping/data/text-rendering-tests/fonts \ + test/api/fonts \ + test/fuzzing/fonts \ + ; do + cp $d/* all-fonts/ +done +zip $OUT/hb-shape-fuzzer_seed_corpus.zip all-fonts/* cp $OUT/hb-shape-fuzzer_seed_corpus.zip $OUT/hb-subset-fuzzer_seed_corpus.zip