2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-30 13:40:37 +00:00

Build all fuzzers with FUTURE=ON and FUTURE=OFF

This commit is contained in:
Jay Berkenbilt 2024-06-18 11:00:44 -04:00
parent 293203ac2d
commit aaa6547335
2 changed files with 22 additions and 11 deletions

View File

@ -8,8 +8,10 @@ sudo apt-get -y install build-essential cmake zlib1g-dev libjpeg-dev
./fuzz/oss-fuzz-build
ls -l out/qpdf_fuzzer
ls -l out/
if ldd out/qpdf_fuzzer | grep -E 'libjpeg|libz|libqpdf'; then
echo 1>&2 "*** Fuzzers linked dynamically with some dependent libraries."
ldd out/qpdf_fuzzer
exit 2
fi
for fuzzer in qpdf_fuzzer future_qpdf_fuzzer; do
if ldd out/$fuzzer | grep -E 'libjpeg|libz|libqpdf'; then
echo 1>&2 "*** Fuzzers linked dynamically with some dependent libraries."
ldd out/$fuzzer
exit 2
fi
done

View File

@ -21,9 +21,18 @@ if [[ $GITHUB_FORK != "" ]]; then
fi
fi
env CMAKE_PREFIX_PATH=$WORK LDFLAGS="-L$WORK/lib -lpthread" \
cmake -S . -B build \
-DOSS_FUZZ=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Debug \
-DUSE_IMPLICIT_CRYPTO=OFF -DREQUIRE_CRYPTO_NATIVE=ON
cmake --build build -j$(nproc) --target fuzzers
cmake --install build --component fuzz
for future in ON OFF; do
rm -rf build
env CMAKE_PREFIX_PATH=$WORK LDFLAGS="-L$WORK/lib -lpthread" \
cmake -S . -B build \
-DOSS_FUZZ=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Debug \
-DUSE_IMPLICIT_CRYPTO=OFF -DREQUIRE_CRYPTO_NATIVE=ON \
-DFUTURE=$future
cmake --build build -j$(nproc) --target fuzzers
cmake --install build --component fuzz
if [[ $future == ON ]]; then
pushd $OUT
for i in *; do mv $i future_$i; done
popd
fi
done