[cfe-dev] TSan on Windows?

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Wed Jan 2 11:05:38 PST 2019


I don't think there are any plans to pursue it in the near future, and I
estimate that it would be quite a lot of work to make it work for C/C++. I
wouldn't recommend that a newbie take this on, as we've discovered that
Windows ASan has an enormous maintenance cost.

I believe Dmitry Vyukov got TSan working on Windows with GCC and Mingw for
Go, but I've never compiled it or tried to use it. A large portion of the
complexity in ASan comes from fighting with the various MSVC CRTs
(static/dynamic, plus every new version) to intercept heap allocation and
key string functions like memset, strlen, etc. This matters a lot when
looking for races in C/C++ programs, but if you are looking for races in
Go, then these things either aren't necessary, or are greatly simplified by
committing to static linking with the Mingw CRT.

On Tue, Jan 1, 2019 at 4:22 AM JVApen via cfe-dev <cfe-dev at lists.llvm.org>
wrote:

> Hello all,
>
> Clang(-cl) on windows has matured well over the last couple of years.
> A long time ago, I've started making our code base compatible with
> clang-cl, at a time that `try` and `throw` where not yet supported for this
> platform.
>
> Since that point, I've logged several bugs, did way too many commits on
> our code and upgraded clang executables several times.
> With the first executables actually being able to run (in full debug
> builds), a world of opportunities is available.
> I was positively surprised to see UBSAN work out-of-the box. (given some
> false positives in non-standard code, which I still have to fix)
>
> Unfortunately, TSAN ain't supported as indicated on
> https://clang.llvm.org/docs/ThreadSanitizer.html and gives a compilation
> error when you try it.
> Are their active plans to get this activated on Windows in the near future?
> If not, would it be feasible for a newbie in llvm-code to look at this?
>
> Happy new year!
> JVApen
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190102/e306f60a/attachment.html>


More information about the cfe-dev mailing list