The issue I run into is some sort of versioning problem: $ clang --version clang version 9.0.0-2~ubuntu18.04.2 (tags/RELEASE_900/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin
but running make on the Makefile with `CONFIG=msan` fails during probobuf build with: checking zlib version... ok (1.2.0.4 or later) checking for library containing zlibVersion... no checking whether clang++ supports C++11 features by default... no checking whether clang++ supports C++11 features with -std=c++11... no checking whether clang++ supports C++11 features with +std=c++11... no checking whether clang++ supports C++11 features with -h std=c++11... no checking whether clang++ supports C++11 features with -std=c++0x... no checking whether clang++ supports C++11 features with +std=c++0x... no checking whether clang++ supports C++11 features with -h std=c++0x... no configure: error: *** A compiler with support for C++11 language features is required. Makefile:794: recipe for target '/var/dev/github/grpc/libs/msan/protobuf/libprotobuf.a' failed make: *** [/var/dev/github/grpc/libs/msan/protobuf/libprotobuf.a] Error 1 searching around brought up some old posts that might be related, e.g.: https://trac.sagemath.org/ticket/22646 On Thursday, October 1, 2020 at 12:05:43 PM UTC-7 [email protected] wrote: > Our current test infrastructure uses bazel for msan tests but earlier we > were using Makefile with `CONFIG=msan` which is why I'm surprised that it > did not work for you. > > On Thursday, September 24, 2020 at 12:27:59 PM UTC-7 [email protected] > wrote: > >> I would like to instrument some c++ code that uses grpc (clang 9, ubuntu >> 18) with memory sanitizer, and to do this, all the libraries it uses must >> be built with msan too. >> >> from the memory sanitizer docs >> <https://github.com/google/sanitizers/wiki/MemorySanitizer#using-instrumented-libraries> >> : >> >> ``` >> It is critical that you should build all the code in your program >> (including libraries it uses, in particular, C++ standard library) with >> MSan. See MemorySanitizerLibcxxHowTo for more details. >> ``` >> >> However, I have so far not succeeded in building msan instrumented grpc, >> and would appreciate some help on how to do this. >> >> I was able to build *address *sanitized grpc simply by setting *CONFIG=asan >> *in the supplied Makefile, but this does not work with *CONFIG=msan >> (plus adding instrumented libc++.so and libc++abi.so as described in docs)* >> >> cmake doesn't seem to have any options to turn on MSAN, and I'm not >> familiar with bazel. >> >> Wondering how to build MSAN instrumented grpc? >> >> thanks in advance! >> > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/7b8e1442-8ced-4d7a-83f8-10587f6e2eean%40googlegroups.com.
