bitcoin-core: Temp workaround for UBSan build failure (#6465)

This commit is contained in:
MarcoFalke 2021-09-20 15:15:32 +02:00 committed by GitHub
parent 0ec1cb2549
commit 0b35db2bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -37,6 +37,13 @@ fi
sed -i "s|PROVIDE_FUZZ_MAIN_FUNCTION|NEVER_PROVIDE_MAIN_FOR_OSS_FUZZ|g" "./configure.ac" sed -i "s|PROVIDE_FUZZ_MAIN_FUNCTION|NEVER_PROVIDE_MAIN_FOR_OSS_FUZZ|g" "./configure.ac"
./autogen.sh ./autogen.sh
# Temporarily compile with O2 to work around clang-13 (and later) UBSan
# -fsanitize=vptr,object-size false positive that only happens with -O1
if [ "$SANITIZER" = "undefined" ]; then
export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2"
fi
# OSS-Fuzz will provide CC, CXX, etc. So only set: # OSS-Fuzz will provide CC, CXX, etc. So only set:
# * --enable-fuzz, see https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md # * --enable-fuzz, see https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md
# * CONFIG_SITE, see https://github.com/bitcoin/bitcoin/blob/master/depends/README.md # * CONFIG_SITE, see https://github.com/bitcoin/bitcoin/blob/master/depends/README.md