[PATCH] D14434: tsan: make invisible test barrier portable

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 03:30:58 PST 2015


dvyukov added a comment.

> Also, this fails a single test on Linux for me, thread_name2.cc. I didn't investigate further.


How exactly does it fail? Please also run it as a stand-alone binary and post output.
FWIW I run linux tests 30 times before uploading this change. All passed.

> Huh, changing *barrier = count; in the initialization into:


I don't understand how it can affect anything. Initialization happens before any threads are started.

> Just a quick question: Wouldn't usleep() invoke the interceptor and establish an unwanted synchronization?


usleep is not synchronization logically. So if the interceptor introduces any synchronization, then it's a bug that we will need to fix. Hopefully the tests will catch it, there are positive tests that must detect races and they should be pretty sensitive to any parasitic synchronization.


http://reviews.llvm.org/D14434





More information about the llvm-commits mailing list