diff options
Diffstat (limited to 'tools/oss-fuzz.sh')
-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 |