Commit f80ff56a authored by Ian Lance Taylor's avatar Ian Lance Taylor

misc/cgo/testsanitizers: skip test for version of clang before 3.6

I've tested with clang 3.6.  The builder is running 3.5, and fails.

Fixes #12814.

Change-Id: I087fb75c3a24bed7f7fa5e9d7a1444590a316d63
Reviewed-on: https://go-review.googlesource.com/15259Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 47ccf96a
......@@ -17,6 +17,18 @@ export CC
if $CC -fsanitize=memory 2>&1 | grep "unrecognized" >& /dev/null; then
echo "skipping msan test: -fsanitize=memory not supported"
else
go run msan.go
exit 0
fi
# The memory sanitizer in versions of clang before 3.6 don't work with Go.
if $CC --version | grep clang >& /dev/null; then
ver=$($CC --version | sed -e 's/.* version \([0-9.-]*\).*/\1/')
major=$(echo $ver | sed -e 's/\([0-9]*\).*/\1/')
minor=$(echo $ver | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/')
if test $major -lt 3 || test $major -eq 3 -a $minor -lt 6; then
echo "skipping msan test; clang version $major.$minor older than 3.6"
exit 0
fi
fi
go run msan.go
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment