[infra][jvm] Fix UBSan C++ builds (#5961)

This commit is contained in:
Fabian Meumertzheim 2021-06-23 17:22:40 +02:00 committed by GitHub
parent 87c80b3a8b
commit 5426b732a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -146,6 +146,13 @@ if [ "$FUZZING_LANGUAGE" = "jvm" ]; then
# Coverage builds require no instrumentation.
cp $(which jazzer_driver) $jazzer_driver_with_sanitizer
fi
# Disable leak checking since the JVM triggers too many false positives.
# function and vptr are also disabled for now as Bazel uses clang instead of
# clang++ when linking the driver, which does not support these C++ UBSan
# features.
export CFLAGS="$CFLAGS -fno-sanitize=function,leak,vptr,"
export CXXFLAGS="$CXXFLAGS -fno-sanitize=function,leak,vptr"
fi
echo "---------------------------------------------------------------"