]> granicus.if.org Git - gc/commitdiff
Revert 'Eliminate TSan false positive for stop_info.stack_ptr'
authorIvan Maidanski <ivmai@mail.ru>
Wed, 29 Nov 2017 08:45:49 +0000 (11:45 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 29 Nov 2017 11:10:40 +0000 (14:10 +0300)
This reverts commit 80ad68c54e8f339204e7f3b4c305d390e7f44006.

Because it does not eliminate the warning fully, a better solution
would be to add a dummy "oh" header to GC_Thread_Rep.

include/private/pthread_support.h

index 9699995bded5e5a4bfd1f4535b855d7e9730c4de..233b59d7b5db032c8d6536953c1ca7c79d8d613c 100644 (file)
@@ -49,19 +49,7 @@ typedef struct GC_Thread_Rep {
 #   ifdef USE_TKILL_ON_ANDROID
       pid_t kernel_id;
 #   endif
-
-    void * status;              /* The value returned from the thread.  */
-                                /* Used only to avoid premature         */
-                                /* reclamation of any data it might     */
-                                /* reference.                           */
-                                /* This is unfortunately also the       */
-                                /* reason we need to intercept join     */
-                                /* and detach.                          */
-
-    /* Extra bookkeeping information the stopping code uses.            */
-    /* Should have the offset of 3 (in words) at least, to avoid TSan   */
-    /* false positive about the race between GC_has_other_debug_info    */
-    /* and GC_suspend_handler_inner (which sets store_stop.stack_ptr).  */
+    /* Extra bookkeeping information the stopping code uses */
     struct thread_stop_info stop_info;
 
 #   if defined(GC_ENABLE_SUSPEND_THREAD) && !defined(GC_DARWIN_THREADS) \
@@ -121,6 +109,14 @@ typedef struct GC_Thread_Rep {
                         /* the innermost GC_call_with_gc_active() of    */
                         /* this thread.  May be NULL.                   */
 
+    void * status;              /* The value returned from the thread.  */
+                                /* Used only to avoid premature         */
+                                /* reclamation of any data it might     */
+                                /* reference.                           */
+                                /* This is unfortunately also the       */
+                                /* reason we need to intercept join     */
+                                /* and detach.                          */
+
 #   ifdef THREAD_LOCAL_ALLOC
         struct thread_local_freelists tlfs;
 #   endif