[PATCH] D14835: [tsan] Make tsan_test_util_posix.cc call pthread interceptors on OS X

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 11:40:29 PST 2015


kubabrecka added a comment.

In http://reviews.llvm.org/D14835#294070, @dvyukov wrote:

> I wonder what's the difference between this test and user code? Normal user code does not call interceptors directly, but still we [hopefully] intercept these calls. Can we make this test behave more like user code instead? There is always value in tests doing exactly the same thing as real system.


In unit tests (not lit tests) we want to call internal functions (not exported by the dylib), so we build a static library instead of the dylib.  In a static library, interceptors don't work on OS X.  User code always uses the dylib -- that's the difference.


http://reviews.llvm.org/D14835





More information about the llvm-commits mailing list