Skip to content

Commit

Permalink
Add memory sanitizer config, and run on travis.
Browse files Browse the repository at this point in the history
Reviewed-by: Rich Salz <[email protected]>
  • Loading branch information
ekasper committed Jul 28, 2016
1 parent 976ef6a commit 29df306
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 9 additions & 1 deletion Configure
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ my @disablables = (
"md2",
"md4",
"mdc2",
"msan",
"multiblock",
"nextprotoneg",
"ocb",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ";
}
#
Expand Down

0 comments on commit 29df306

Please sign in to comment.