[compiler-rt] r287629 - tsan: mark cur_thread_placeholder definition as initial-exec
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 00:59:18 PST 2016
Author: dvyukov
Date: Tue Nov 22 02:59:17 2016
New Revision: 287629
URL: http://llvm.org/viewvc/llvm-project?rev=287629&view=rev
Log:
tsan: mark cur_thread_placeholder definition as initial-exec
See https://sourceware.org/bugzilla/show_bug.cgi?id=20805 and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78294 for context.
Previously we marked only declaration as initial-exec. But compilers treat
initial-exec attribute somewhat differently. Mark definition as well.
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=287629&r1=287628&r2=287629&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Tue Nov 22 02:59:17 2016
@@ -45,6 +45,7 @@ extern "C" void __tsan_resume() {
namespace __tsan {
#if !SANITIZER_GO && !SANITIZER_MAC
+__attribute__((tls_model("initial-exec")))
THREADLOCAL char cur_thread_placeholder[sizeof(ThreadState)] ALIGNED(64);
#endif
static char ctx_placeholder[sizeof(Context)] ALIGNED(64);
More information about the llvm-commits
mailing list