From d947ea3ea0f79534ecb17f7137058faf29dbd8f6 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 4 Sep 2018 20:16:23 +0100 Subject: [PATCH] __alltest.sh: add clang's -fsanitize=memory flavour Bug: https://github.com/skvadrik/re2c/issues/215 Signed-off-by: Sergei Trofimovich --- re2c/__alltest.sh | 4 ++-- re2c/__build_clang.sh | 2 +- re2c/__build_clang_msan.sh | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100755 re2c/__build_clang_msan.sh diff --git a/re2c/__alltest.sh b/re2c/__alltest.sh index 6031affc..1782cc81 100755 --- a/re2c/__alltest.sh +++ b/re2c/__alltest.sh @@ -1,10 +1,10 @@ #!/bin/sh # normal tests -for d in __build{,_asan,_ubsan,_lsan,_clang,_m32} ; do +for d in __build{,_asan,_ubsan,_lsan,_clang,_clang_msan,_m32} ; do ./${d}.sh \ && cd ${d} \ - && make tests \ + && make check VERBOSE=1 \ && cd .. \ || { cd .. ; echo "*** ${d} failed ***"; exit 1; } done diff --git a/re2c/__build_clang.sh b/re2c/__build_clang.sh index 6b9b19e4..9db0bd73 100755 --- a/re2c/__build_clang.sh +++ b/re2c/__build_clang.sh @@ -5,6 +5,6 @@ rm -rf $builddir mkdir $builddir cd $builddir -../configure CXX=clang++ && \ +../configure CC=clang CXX=clang++ && \ make -j5 cd .. diff --git a/re2c/__build_clang_msan.sh b/re2c/__build_clang_msan.sh new file mode 100755 index 00000000..524b64b0 --- /dev/null +++ b/re2c/__build_clang_msan.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +builddir=__build_clang_msan +rm -rf $builddir +mkdir $builddir + +cd $builddir +../configure CC=clang CXX=clang++ CFLAGS="-fsanitize=memory" CXXFLAGS="-fsanitize=memory" LDFLAGS="-fsanitize=memory" && \ +make -j5 +cd .. -- 2.40.0