When I try to run the go unit test system with the memory sanity checking I get an error message that I am sure I use to solve by setting my compiler to CLANG.
The Go Command Documenation is a little brief on the matter.
-msan
enable interoperation with memory sanitizer.
Supported only on linux/amd64, linux/arm64
and only with Clang/LLVM as the host C compiler.
On linux/arm64, pie build mode will be used.
In the past I was use I got this to work by calling:
CC=clang go test -msan ./..
However when I do that now I get errors such as:
g++: error: unrecognized argument to -fsanitize= option: ‘memory’
What do I need to do in order to run my golang tests with the memory sanitizer under Ubuntu 18:04 ?
I am using the following versions of tools at the moment:
$ go version
go version go1.14 linux/amd64
$ clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin