[cfe-dev] TSAN shows data race in ~std::shared_ptr
Kostya Serebryany
kcc at google.com
Tue Feb 18 01:39:12 PST 2014
>
>
> Fair enough. I'm using cmake to build, so I added the flag with
> -DLIBCXX_CXX_FEATURE_FLAGS=-fsanitize=thread
>
I afraid this is not going to work. tsan-instrumented libc++.so can be used
only with tsan-instrumented binaries.
With non-instrumented binaries you will be getting link time errors (just
like you did).
BTW, I filed a bug for better build/test system support:
https://code.google.com/p/thread-sanitizer/issues/detail?id=48
--kcc
I'm getting some undefined symbol: __tsan_init whilst building anything.
> If I use the instrumented libc++, would it not have a negative performance
> impact on every application that uses it? Should I build it with a
> different name and then use -nostdlib -lc++-tsan in my tsan specific build?
> I guess I could even add libc++ to my projects cmake build and link to the
> one I built as part of that.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140218/4e57f4a2/attachment.html>
More information about the cfe-dev
mailing list