From 5c8f9b7a1d67066354123a306508b353a168fd72 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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200914 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/sanitizer_thread_registry.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/sanitizer_common/sanitizer_thread_registry.cc b/lib/sanitizer_common/sanitizer_thread_registry.cc index bfa29a19c..ed5ed711b 100644 --- a/lib/sanitizer_common/sanitizer_thread_registry.cc +++ b/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); -- 2.11.4.GIT