As of clang-4.0, Thread Sanitizer does not support creation of threads
in the forked process (before exec). So, GC_start_mark_threads()
is a no-op now if TSan is enabled.
* misc.c [THREADS && PARALLEL_MARK && CAN_HANDLE_FORK]
(GC_start_mark_threads): Do not call GC_start_mark_threads_inner()
if THREAD_SANITIZER; add comment.
#if defined(THREADS)
GC_API void GC_CALL GC_start_mark_threads(void)
{
-# if defined(PARALLEL_MARK) && defined(CAN_HANDLE_FORK)
+# if defined(PARALLEL_MARK) && defined(CAN_HANDLE_FORK) \
+ && !defined(THREAD_SANITIZER)
+ /* TSan does not support threads creation in the child process. */
IF_CANCEL(int cancel_state;)
DISABLE_CANCEL(cancel_state);