Eliminate TSan false positive for stop_info.stack_ptr
authorIvan Maidanski <ivmai@mail.ru>
Fri, 17 Nov 2017 16:41:30 +0000 (19:41 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 17 Nov 2017 16:41:30 +0000 (19:41 +0300)
commit80ad68c54e8f339204e7f3b4c305d390e7f44006
treede80eab6ff1d1bb6d8225a71e2d7f00f0b583c7e
parentd9df01a6829fac03bb35469895b17c1ab5adb828
Eliminate TSan false positive for stop_info.stack_ptr

Without this patch, Thread Sanitizer reports a data race between
GC_has_other_debug_info() and the code which sets stop_info.stack_ptr.

* include/private/pthread_support.h (GC_Thread_Rep.status): Move the
field to be before stop_info one (so, the latter now has the offset
of at least 3 in words, while oh.oh_sz has the offset of 2 in words
(when KEEP_BACK_PTRS, MAKE_BACK_GRAPH and NEED_CALLINFO are not
defined)).
include/private/pthread_support.h