[compiler-rt] r177012 - [TSan] Use __sanitizer_pthread_attr_t in TSan

Alexey Samsonov samsonov at google.com
Thu Mar 14 00:10:52 PDT 2013


Author: samsonov
Date: Thu Mar 14 02:10:52 2013
New Revision: 177012

URL: http://llvm.org/viewvc/llvm-project?rev=177012&view=rev
Log:
[TSan] Use __sanitizer_pthread_attr_t in TSan

Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=177012&r1=177011&r2=177012&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Thu Mar 14 02:10:52 2013
@@ -86,11 +86,6 @@ typedef void (*sighandler_t)(int sig);
 
 #define errno (*__errno_location())
 
-union pthread_attr_t {
-  char size[kPthreadAttrSize];
-  void *align;
-};
-
 struct sigaction_t {
   union {
     sighandler_t sa_handler;
@@ -734,7 +729,7 @@ extern "C" void *__tsan_thread_start_fun
 TSAN_INTERCEPTOR(int, pthread_create,
     void *th, void *attr, void *(*callback)(void*), void * param) {
   SCOPED_TSAN_INTERCEPTOR(pthread_create, th, attr, callback, param);
-  pthread_attr_t myattr;
+  __sanitizer_pthread_attr_t myattr;
   if (attr == 0) {
     pthread_attr_init(&myattr);
     attr = &myattr;





More information about the llvm-commits mailing list