oss-fuzz: turn on the pointer-overflow check

It's off by default on OSS-Fuzz but it should be safe to turn it on
manually: https://github.com/google/oss-fuzz/issues/659#issuecomment-631897889

Just a follow-up to https://github.com/systemd/systemd/pull/15865.
This commit is contained in:
Evgeny Vereshchagin 2020-05-21 08:20:01 +02:00
parent b10ceb4783
commit 1f034000a5
1 changed files with 7 additions and 1 deletions

View File

@ -27,9 +27,15 @@ build=$WORK/build
rm -rf $build
mkdir -p $build
fuzzflag="oss-fuzz=true"
if [ -z "$FUZZING_ENGINE" ]; then
fuzzflag="llvm-fuzz=true"
else
fuzzflag="oss-fuzz=true"
if [[ "$SANITIZER" == undefined ]]; then
UBSAN_FLAGS="-fsanitize=pointer-overflow -fno-sanitize-recover=pointer-overflow"
CFLAGS="$CFLAGS $UBSAN_FLAGS"
CXXFLAGS="$CXXFLAGS $UBSAN_FLAGS"
fi
fi
meson $build -D$fuzzflag -Db_lundef=false