]> granicus.if.org Git - gc/commitdiff
Revert 'Workaround TSan hang in GC_free_inner when called from at-fork'
authorIvan Maidanski <ivmai@mail.ru>
Wed, 13 Dec 2017 06:27:32 +0000 (09:27 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 13 Dec 2017 14:31:33 +0000 (17:31 +0300)
This reverts commit d8e271ea8ab4477fc3ac8edb884bbf858d401343.

Because there is a better solution not to skip GC_INTERNAL_FREE in
GC_remove_all_threads_but_me if called from GC_atfork_child.

pthread_support.c

index ba4b590cf9dabb5015223624f5a8672a7664fcd3..c5a27f061b69065b2d67d173bb8211d24798a2fe 100644 (file)
@@ -789,11 +789,7 @@ STATIC void GC_remove_all_threads_but_me(void)
               GC_remove_specific_after_fork(GC_thread_key, p -> id);
             }
 #         endif
-          /* 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
+          if (p != &first_thread) GC_INTERNAL_FREE(p);
         }
       }
       GC_threads[hv] = me;