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.
This commit is contained in:
Behdad Esfahbod 2018-10-25 17:24:24 -07:00 committed by Oliver Chang
parent a4c654b5ee
commit 6d82dbf32c
1 changed files with 12 additions and 3 deletions

View File

@ -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