We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47ccf96 commit f80ff56Copy full SHA for f80ff56
misc/cgo/testsanitizers/test.bash
@@ -17,6 +17,18 @@ export CC
17
18
if $CC -fsanitize=memory 2>&1 | grep "unrecognized" >& /dev/null; then
19
echo "skipping msan test: -fsanitize=memory not supported"
20
-else
21
- go run msan.go
+ exit 0
22
fi
+
23
+# The memory sanitizer in versions of clang before 3.6 don't work with Go.
24
+if $CC --version | grep clang >& /dev/null; then
25
+ ver=$($CC --version | sed -e 's/.* version \([0-9.-]*\).*/\1/')
26
+ major=$(echo $ver | sed -e 's/\([0-9]*\).*/\1/')
27
+ minor=$(echo $ver | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/')
28
+ if test $major -lt 3 || test $major -eq 3 -a $minor -lt 6; then
29
+ echo "skipping msan test; clang version $major.$minor older than 3.6"
30
31
+ fi
32
+fi
33
34
+go run msan.go
0 commit comments