On Tue, Sep 13, 2016 at 5:03 AM, Markus Zimmermann <zim...@gmail.com
> On Friday, September 9, 2016 at 1:51:49 PM UTC+2, Ian Lance Taylor wrote:
>> > I have the following questions concerning the usage of the -msan flag:
>> > a.) Are these the preferred arguments to use the -msan flag?
>> Looks OK to me.
> I am wondering if they are really needed, and if yes, why are they not
> included at compile time by the Go compiler?
The Go tool will add the -fsanitize=memory option, so you shouldn't
need to add that yourself. It won't add the other options, though.
> Also, would it make sense to
> add -fsanitize-memory-track-origins as -msan-track-origins flag to Go build?
I think not, because I think that is a choice for the user to make.
>> > d.) What are the official minimum requirements for the -msan flag? (LLVM
>> > >=
>> > 3.8? ...?)
>> Yes, on GNU/Linux you need at least LLVM 3.8. I don't know of any
>> other requirements.
> I am wondering if the version requirement should be added to the help text
> of -msan? It currently states "enable interoperation with memory sanitizer.
> Supported only on linux/amd64, and only with Clang/LLVM as the host C
> compiler." I am also wondering why these conditions (as stated in
) are not checked
> during compile time? Would that be a good Go addition?
I don't think it makes sense to add specific version numbers to the
-msan help text. The specific details can change with changing Linux
versions, and really the compatibility has nothing to do with Go.
Perhaps it would make sense to say something like "requires a version
of LLVM that supports -fsanitize=memory on the version of GNU/Linux
that the program runs on." I don't know how much that would help