Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -161,7 +161,7 @@ SI_FREEBSD || SI_MAC || SI_LINUX_NOT_ANDROID #define SANITIZER_INTERCEPT_SIGPENDING SI_NOT_WINDOWS #define SANITIZER_INTERCEPT_SIGPROCMASK SI_NOT_WINDOWS -#define SANITIZER_INTERCEPT_BACKTRACE SI_LINUX_NOT_ANDROID +#define SANITIZER_INTERCEPT_BACKTRACE SI_FREEBSD || SI_LINUX_NOT_ANDROID #define SANITIZER_INTERCEPT_GETMNTENT SI_LINUX #define SANITIZER_INTERCEPT_GETMNTENT_R SI_LINUX_NOT_ANDROID #define SANITIZER_INTERCEPT_STATFS SI_FREEBSD || SI_MAC || SI_LINUX_NOT_ANDROID Index: compiler-rt/trunk/test/msan/backtrace.cc =================================================================== --- compiler-rt/trunk/test/msan/backtrace.cc +++ compiler-rt/trunk/test/msan/backtrace.cc @@ -17,7 +17,7 @@ char **s = backtrace_symbols(buf, sz); assert(s > 0); for (int i = 0; i < sz; ++i) - printf("%d\n", strlen(s[i])); + printf("%d\n", (int)strlen(s[i])); } int main(void) { Index: compiler-rt/trunk/test/msan/lit.cfg =================================================================== --- compiler-rt/trunk/test/msan/lit.cfg +++ compiler-rt/trunk/test/msan/lit.cfg @@ -14,6 +14,9 @@ "-fno-omit-frame-pointer", "-fno-optimize-sibling-calls", "-m64"] + config.debug_info_flags +# Some Msan tests leverage backtrace() which requires libexecinfo on FreeBSD. +if config.host_os == 'FreeBSD': + clang_msan_cflags += ["-lexecinfo"] clang_msan_cxxflags = config.cxx_mode_flags + clang_msan_cflags def build_invocation(compile_flags):