From: Ivan Maidanski Date: Wed, 29 Nov 2017 08:45:49 +0000 (+0300) Subject: Revert 'Eliminate TSan false positive for stop_info.stack_ptr' X-Git-Tag: v8.0.0~482 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9d8493c7a988edef552a19a55b59ae168296fe5;p=gc Revert 'Eliminate TSan false positive for stop_info.stack_ptr' 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. --- diff --git a/include/private/pthread_support.h b/include/private/pthread_support.h index 9699995b..233b59d7 100644 --- a/include/private/pthread_support.h +++ b/include/private/pthread_support.h @@ -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