* pthread_support.c [CAN_HANDLE_FORK] (GC_remove_all_threads_but_me):
Do not call GC_INTERNAL_FREE(p) if THREAD_SANITIZER; add comment.
GC_remove_specific_after_fork(GC_thread_key, p -> id);
}
# endif
- if (p != &first_thread) GC_INTERNAL_FREE(p);
+ /* TODO: To avoid TSan hang (when updating GC_bytes_freed), */
+ /* we just skip explicit free of GC_threads entries for now. */
+# ifndef THREAD_SANITIZER
+ if (p != &first_thread) GC_INTERNAL_FREE(p);
+# endif
}
}
GC_threads[hv] = me;