From 78a2c0752c599d5dc951b8cf6fbe741bda0eeedd Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 12 Sep 2021 21:08:56 +0100 Subject: ofz: better workaround for broken msan build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit workaround https://github.com/google/oss-fuzz/issues/6427 by forcing use of the libc++.a in /usr/msan/lib when compiling the msan version Change-Id: I4e992cd7710b5929e74034db7a49c590349149fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122014 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- bin/oss-fuzz-build.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin') diff --git a/bin/oss-fuzz-build.sh b/bin/oss-fuzz-build.sh index 906cadd500d4..2bed84d865e4 100755 --- a/bin/oss-fuzz-build.sh +++ b/bin/oss-fuzz-build.sh @@ -12,6 +12,9 @@ echo start at `date -u` #shuffle CXXFLAGS -stdlib=libc++ arg into CXX as well because we use #the CXX as the linker and need to pass -stdlib=libc++ to build export CXX="$CXX -stdlib=libc++ -fsanitize-blacklist=$SRC/libreoffice/bin/sanitize-excludelist.txt" +if [[ $SANITIZER_FLAGS = *sanitize=memory* ]]; then + export CXX="$CXX -Wno-unused-command-line-argument -L/usr/msan/lib" +fi export CC="$CC -fsanitize-blacklist=$SRC/libreoffice/bin/sanitize-excludelist.txt" #similarly force the -fsanitize etc args in as well as pthread to get #things to link successfully during the build -- cgit