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.

llvm-svn: 267720
This commit is contained in:
Dmitry Vyukov 2016-04-27 14:28:42 +00:00
parent f875acbd77
commit 4592eb0534
1 changed files with 2 additions and 2 deletions

View File

@ -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 *buffer) {
}
#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 *buffer) {
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) {