aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-02-14 02:59:12 +0100
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-02-14 02:59:12 +0100
commitd66cba2b93f9f91b87d380b23b8f571d10ab2bb6 (patch)
treeba1fbd1bbb69d761b60ebab2deabceacbb306563
parent44cdd6ec1af7bb761274ded521dbc14dc8721157 (diff)
Properly msan-instrumenting protobuf and our C++ tests - but gflags isn't instrumented yet.
-rw-r--r--INSTALL5
-rw-r--r--Makefile8
-rw-r--r--templates/Makefile.template8
3 files changed, 13 insertions, 8 deletions
diff --git a/INSTALL b/INSTALL
index e3c05707db..d2f08ec677 100644
--- a/INSTALL
+++ b/INSTALL
@@ -90,6 +90,11 @@ these dependencies this way:
# apt-get install autoconf libtool
+If you want to run the tests using one of the sanitized configurations, you
+will need clang and its instrumented libc++:
+
+ # apt-get install clang libc++-dev
+
A word on OpenSSL
-----------------
diff --git a/Makefile b/Makefile
index fe0f7035e6..c7f7e9302d 100644
--- a/Makefile
+++ b/Makefile
@@ -66,13 +66,13 @@ DEFINES_asan = NDEBUG
VALID_CONFIG_msan = 1
REQUIRE_CUSTOM_LIBRARIES_msan = 1
CC_msan = clang
-CXX_msan = clang++
+CXX_msan = clang++-libc++
LD_msan = clang
-LDXX_msan = clang++
-CPPFLAGS_msan = -O1 -fsanitize=memory -fno-omit-frame-pointer
+LDXX_msan = clang++-libc++
+CPPFLAGS_msan = -O1 -fsanitize=memory -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1
OPENSSL_CFLAGS_msan = -DPURIFY
OPENSSL_CONFIG_msan = no-asm
-LDFLAGS_msan = -fsanitize=memory
+LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1
DEFINES_msan = NDEBUG
VALID_CONFIG_ubsan = 1
diff --git a/templates/Makefile.template b/templates/Makefile.template
index b9ae217054..992b906932 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -83,13 +83,13 @@ DEFINES_asan = NDEBUG
VALID_CONFIG_msan = 1
REQUIRE_CUSTOM_LIBRARIES_msan = 1
CC_msan = clang
-CXX_msan = clang++
+CXX_msan = clang++-libc++
LD_msan = clang
-LDXX_msan = clang++
-CPPFLAGS_msan = -O1 -fsanitize=memory -fno-omit-frame-pointer
+LDXX_msan = clang++-libc++
+CPPFLAGS_msan = -O1 -fsanitize=memory -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1
OPENSSL_CFLAGS_msan = -DPURIFY
OPENSSL_CONFIG_msan = no-asm
-LDFLAGS_msan = -fsanitize=memory
+LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1
DEFINES_msan = NDEBUG
VALID_CONFIG_ubsan = 1