From a98fa4f760eacc26aa33ed396640253e29786cce Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Tue, 23 Jan 2024 15:16:10 +0100 Subject: [PATCH] Do not use fuzzer flags on deps. (#1968) --- tests/oss-fuzz/build.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/oss-fuzz/build.sh b/tests/oss-fuzz/build.sh index d9a29bc71d..1c58ae7843 100755 --- a/tests/oss-fuzz/build.sh +++ b/tests/oss-fuzz/build.sh @@ -36,13 +36,21 @@ # avif_fuzztest_enc_dec_incr@EncodeDecodeAvifFuzzTest.EncodeDecodeGridValid \ # --sanitizer address -# Add asan as a dependency by default to fix builds. -export CXXFLAGS="${CXXFLAGS} -fsanitize=address" -export CFLAGS="${CFLAGS} -fsanitize=address" +# Reset compile flags to build some deps without fuzzer flags. +export ORIG_CFLAGS="$CFLAGS" +export ORIG_CXXFLAGS="$CXXFLAGS" +export CFLAGS="" +export CXXFLAGS="" + +# fuzz flags are problematic with meson (hence no dav1d) and no point in fuzzing fuzztest. +cd ext && bash dav1d.cmd && bash fuzztest.cmd && cd .. + +export CFLAGS=$ORIG_CFLAGS +export CXXFLAGS=$ORIG_CXXFLAGS # build dependencies -cd ext && bash aom.cmd && bash dav1d.cmd && bash fuzztest.cmd && bash libjpeg.cmd && \ - bash libsharpyuv.cmd && bash libyuv.cmd && bash zlibpng.cmd && cd .. +cd ext && bash aom.cmd && bash libjpeg.cmd && bash libsharpyuv.cmd && \ + bash libyuv.cmd && bash zlibpng.cmd && cd .. # build libavif mkdir build