summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-11-12 18:50:19 +0000
committerDmitry Vyukov <dvyukov@google.com>2015-11-12 18:50:19 +0000
commitb8da794ca1230bb0ccca8014916973187e50ca3f (patch)
tree2169c2b9f1008a3cf238396c35f8cc54298ecd47 /compiler-rt
parent911ced6bf384dfcb9da007434a951ed2270e8993 (diff)
downloadbcm5719-llvm-b8da794ca1230bb0ccca8014916973187e50ca3f.tar.gz
bcm5719-llvm-b8da794ca1230bb0ccca8014916973187e50ca3f.zip
tsan: fix windows Go build
Go build does not link in whatever library provides these symbols: # runtime/race race_windows_amd64.syso:gotsan.cc:(.text+0x578f): undefined reference to `__sanitizer::DumpProcessMap()' race_windows_amd64.syso:gotsan.cc:(.text+0xee33): undefined reference to `EnumProcessModules' race_windows_amd64.syso:gotsan.cc:(.text+0xeeb9): undefined reference to `GetModuleInformation' llvm-svn: 252922
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_common.cc2
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_win.cc2
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.cc b/compiler-rt/lib/sanitizer_common/sanitizer_common.cc
index b40a457c0b3..40edf499ddc 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.cc
@@ -176,7 +176,9 @@ void NORETURN ReportMmapFailureAndDie(uptr size, const char *mem_type,
Report("ERROR: %s failed to "
"%s 0x%zx (%zd) bytes of %s (error code: %d)\n",
SanitizerToolName, mmap_type, size, size, mem_type, err);
+#ifndef SANITIZER_GO
DumpProcessMap();
+#endif
UNREACHABLE("unable to mmap");
}
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_win.cc b/compiler-rt/lib/sanitizer_common/sanitizer_win.cc
index bc0cdcb332c..d347c190c69 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_win.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_win.cc
@@ -368,6 +368,7 @@ static uptr GetPreferredBase(const char *modname) {
return (uptr)pe_header->ImageBase;
}
+#ifndef SANITIZER_GO
uptr GetListOfModules(LoadedModule *modules, uptr max_modules,
string_predicate_t filter) {
HANDLE cur_process = GetCurrentProcess();
@@ -436,7 +437,6 @@ uptr GetListOfModules(LoadedModule *modules, uptr max_modules,
return count;
};
-#ifndef SANITIZER_GO
// We can't use atexit() directly at __asan_init time as the CRT is not fully
// initialized at this point. Place the functions into a vector and use
// atexit() as soon as it is ready for use (i.e. after .CRT$XIC initializers).
OpenPOWER on IntegriCloud