Skip to content

Commit c179c66

Browse files
authored
bitcoin-core: disable _FORTIFY_SOURCE for MSAN (google#11792)
Related to bitcoin/bitcoin#29837.
1 parent 6ba602c commit c179c66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

projects/bitcoin-core/build.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ sed -i "s|PROVIDE_FUZZ_MAIN_FUNCTION|NEVER_PROVIDE_MAIN_FOR_OSS_FUZZ|g" "./confi
5454
# * --enable-fuzz, see https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md
5555
# * CONFIG_SITE, see https://github.com/bitcoin/bitcoin/blob/master/depends/README.md
5656
if [ "$SANITIZER" = "memory" ]; then
57-
CONFIG_SITE="$PWD/depends/$BUILD_TRIPLET/share/config.site" ./configure --enable-fuzz SANITIZER_LDFLAGS="$LIB_FUZZING_ENGINE" --disable-hardening
57+
# _FORTIFY_SOURCE is not compatible with MSAN.
58+
export CPPFLAGS="${CPPFLAGS} -U_FORTIFY_SOURCE"
59+
CONFIG_SITE="$PWD/depends/$BUILD_TRIPLET/share/config.site" ./configure --enable-fuzz SANITIZER_LDFLAGS="$LIB_FUZZING_ENGINE"
5860
else
5961
CONFIG_SITE="$PWD/depends/$BUILD_TRIPLET/share/config.site" ./configure --enable-fuzz SANITIZER_LDFLAGS="$LIB_FUZZING_ENGINE"
6062
fi

0 commit comments

Comments
 (0)