[PATCH] D18496: [tsan] Fix a crash when exiting the main thread (e.g. dispatch_main)

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 27 07:22:08 PDT 2016


dvyukov added inline comments.

================
Comment at: test/tsan/Darwin/dispatch_main.mm:27
@@ +26,3 @@
+      NSLog(@"Done.");
+      sleep(3);
+      exit(0);
----------------
Why do we need this sleep? Can we remove it? Can we use the invisible barrier instead?
This test will run for 3 seconds. I would like to reduce it's duration.

================
Comment at: test/tsan/Darwin/dispatch_main.mm:28
@@ +27,3 @@
+      sleep(3);
+      exit(0);
+    });
----------------
This is exit which should terminate whole process. How is calling pthread_exit? Where? 


http://reviews.llvm.org/D18496





More information about the llvm-commits mailing list