[compiler-rt] r267720 - tsan: fix darwin Go support
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 07:28:42 PDT 2016
Author: dvyukov
Date: Wed Apr 27 09:28:42 2016
New Revision: 267720
URL: http://llvm.org/viewvc/llvm-project?rev=267720&view=rev
Log:
tsan: fix darwin Go support
os_trace turns out to be a macro that creates static object.
Function-static objects use __cxa_atexit and __dso_handle
which are not present in Go runtime.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc?rev=267720&r1=267719&r2=267720&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc Wed Apr 27 09:28:42 2016
@@ -468,6 +468,7 @@ void LogMessageOnPrintf(const char *str)
}
void LogFullErrorReport(const char *buffer) {
+#ifndef SANITIZER_GO
// Log with os_trace. This will make it into the crash log.
#if SANITIZER_OS_TRACE
if (GetMacosVersion() >= MACOS_VERSION_YOSEMITE) {
@@ -489,7 +490,6 @@ void LogFullErrorReport(const char *buff
}
#endif
-#ifndef SANITIZER_GO
// Log to syslog.
// The logging on OS X may call pthread_create so we need the threading
// environment to be fully initialized. Also, this should never be called when
@@ -500,9 +500,9 @@ void LogFullErrorReport(const char *buff
BlockingMutexLock l(&syslog_lock);
if (common_flags()->log_to_syslog)
WriteToSyslog(buffer);
-#endif
// The report is added to CrashLog as part of logging all of Printf output.
+#endif
}
SignalContext::WriteFlag SignalContext::GetWriteFlag(void *context) {
More information about the llvm-commits
mailing list