Add memory sanitizer config, and run on travis.
authorEmilia Kasper <emilia@openssl.org>
Thu, 28 Jul 2016 18:24:28 +0000 (20:24 +0200)
committerEmilia Kasper <emilia@openssl.org>
Thu, 28 Jul 2016 19:43:27 +0000 (21:43 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
.travis.yml
Configure

index 718a350fbdd1df1162ca1c0934f2c4f96330e345..a278cb2c9fbc7499e90b3790e5e2db63e52d6076 100644 (file)
@@ -34,6 +34,9 @@ matrix:
         - os: linux
           compiler: clang-3.6
           env: CONFIG_OPTS="no-shared enable-asan"
+        - os: linux
+          compiler: clang-3.6
+          env: CONFIG_OPTS="no-shared enable-msan"
         - os: linux
           compiler: clang-3.6
           env: CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method -fno-sanitize=alignment"
index bd13d378beb14a090b0fbdc45df48b447da0ebfd..d4f67aba4361860062b9add0a59962f19ed82d50 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -311,6 +311,7 @@ my @disablables = (
     "md2",
     "md4",
     "mdc2",
+    "msan",
     "multiblock",
     "nextprotoneg",
     "ocb",
@@ -369,6 +370,7 @@ our %disabled = ( # "what"         => "comment"
                  "fuzz-libfuzzer"      => "default",
                  "fuzz-afl"            => "default",
                  "md2"                 => "default",
+                  "msan"                => "default",
                  "rc5"                 => "default",
                  "sctp"                => "default",
                  "ssl-trace"           => "default",
@@ -439,6 +441,8 @@ my @disable_cascades = (
     "apps"              => [ "tests" ],
     "comp"             => [ "zlib" ],
     sub { !$disabled{"unit-test"} } => [ "heartbeats" ],
+
+    sub { !$disabled{"msan"} } => [ "asm" ],
     );
 
 # Avoid protocol support holes.  Also disable all versions below N, if version
@@ -1063,8 +1067,12 @@ unless ($disabled{ubsan}) {
     $config{cflags} .= "-fsanitize=undefined -fno-sanitize-recover=all ";
 }
 
+unless ($disabled{msan}) {
+  $config{cflags} .= "-fsanitize=memory ";
+}
+
 unless ($disabled{"fuzz-libfuzzer"} && $disabled{"fuzz-afl"}
-        && $disabled{asan} && $disabled{ubsan}) {
+        && $disabled{asan} && $disabled{ubsan} && $disabled{msan}) {
     $config{cflags} .= "-fno-omit-frame-pointer -g ";
 }
 #