diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2020-05-21 08:20:01 +0200 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2020-05-21 08:52:18 +0200 |
commit | 1f034000a5343c6580338b1b306307525df5f6bf (patch) | |
tree | 791e77d4a8d78357abc406875ea0c77881ef970e /tools | |
parent | Merge pull request #15557 from poettering/journal-zero-fix (diff) | |
download | systemd-1f034000a5343c6580338b1b306307525df5f6bf.tar.xz systemd-1f034000a5343c6580338b1b306307525df5f6bf.zip |
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.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/oss-fuzz.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh index 79846f8787..5b8690b687 100755 --- a/tools/oss-fuzz.sh +++ b/tools/oss-fuzz.sh @@ -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 |