Bump fuzztest dependency.

Also do not restrict the oss-fuzz script to libfuzzer:
this allows new fuzzer engines to try the script as is.
The libfuzzer restriction is done upstream anyway.

Bug: oss-fuzz:69508
Change-Id: I15685bc7193bef3b9ccb0e0a30a6262e7bfb6fb9
This commit is contained in:
Vincent Rabaud 2024-06-21 18:27:37 +02:00
parent 9ce982fdf2
commit f2fe8decce
3 changed files with 4 additions and 13 deletions

View File

@ -35,7 +35,7 @@ set(fuzztest_SOURCE_DIR ${CMAKE_BINARY_DIR}/_deps/fuzztest-src)
FetchContent_Declare(
fuzztest
GIT_REPOSITORY https://github.com/google/fuzztest.git
GIT_TAG ce454aced15f7dc2cc96aeae969a6204b563b4c9
GIT_TAG 078ea0871cc96d3a69bad406577f176a4fa14ae9
GIT_PROGRESS TRUE
PATCH_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/patch.sh)

View File

@ -18,6 +18,7 @@
# This script is meant to be run by the oss-fuzz infrastructure from the script
# https://github.com/google/oss-fuzz/blob/master/projects/libwebp/build.sh
# It builds the different fuzz targets.
# Only the libfuzzer engine is supported.
# To test changes to this file:
# - make changes and commit to your REPO
@ -38,17 +39,9 @@
set -eu
# Avoid fuzz engines that do not compile.
if [[ "$FUZZING_ENGINE" != "libfuzzer" ]]; then
exit
fi
EXTRA_CMAKE_FLAGS=""
if [ "$FUZZING_ENGINE" == "libfuzzer" ]
then
export CXXFLAGS="${CXXFLAGS} -DFUZZTEST_COMPATIBILITY_MODE"
EXTRA_CMAKE_FLAGS="-DFUZZTEST_COMPATIBILITY_MODE=libfuzzer"
fi
export CXXFLAGS="${CXXFLAGS} -DFUZZTEST_COMPATIBILITY_MODE"
EXTRA_CMAKE_FLAGS="-DFUZZTEST_COMPATIBILITY_MODE=libfuzzer"
# limit allocation size to reduce spurious OOMs
WEBP_CFLAGS="$CFLAGS -DWEBP_MAX_IMAGE_SIZE=838860800" # 800MiB

View File

@ -8,5 +8,3 @@ after="if (data.size() == 0) return;"
sed -i "s/${before}/${after}/" ./fuzztest/internal/compatibility_mode.cc
sed -i "s/set(GTEST_HAS_ABSL ON)/set(GTEST_HAS_ABSL OFF)/" \
./cmake/BuildDependencies.cmake
# Fixes https://github.com/google/fuzztest/issues/1192
git revert --no-commit ed6f817771702bf7823b73498d0e1914475f2313