From a5d1fcfde1b3900f7fdd061cfa610fb5576ea3b3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 6 Feb 2014 09:22:29 +0000 Subject: [PATCH] tsan: improve error message for Go llvm-svn: 200914 --- .../lib/sanitizer_common/sanitizer_thread_registry.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc b/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc index bfa29a19cd2d..ed5ed711b424 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc @@ -130,8 +130,13 @@ u32 ThreadRegistry::CreateThread(uptr user_id, bool detached, u32 parent_tid, tctx = context_factory_(tid); threads_[tid] = tctx; } else { +#ifndef SANITIZER_GO Report("%s: Thread limit (%u threads) exceeded. Dying.\n", SanitizerToolName, max_threads_); +#else + Printf("race: limit on %u simultaneously alive goroutines is exceeded," + " dying\n", max_threads_); +#endif Die(); } CHECK_NE(tctx, 0);