mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
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/15259 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
47ccf96a95
commit
f80ff56a7d
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue