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? Also, would it make sense to add -fsanitize-memory-track-origins as -msan-track-origins flag to Go build? > b.) Why are there no line numbers in the traces? > > I don't know. Try adding -g to CGO_CPPFLAGS to see if it makes a > difference. > > > c.) Any advice on how I can debug such problems? > > If -g doesn't help then I think you'll have to use objdump or gdb or > lldb to look at the code at the failing address. Those tools should > at least let you map that address back to a source line. Note that > the problem does not seem to be in Go code, which of course is > unsurprising. > Unfortunately -g does not make a difference. However, you are right that this is not a Go problem and I will create a bug report in the LLVM tracker. > 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 https://golang.org/misc/cgo/testsanitizers/test.bash ) are not checked during compile time? Would that be a good Go addition? Thanks for your answers. They are really helpful. Cheers, Markus -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.