Port TSAN wiki to clang docs
https://github.com/google/sanitizers/wiki/ has many useful docs on TSAN. The most popular google search result for TSAN_OPTIONS is https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags (although this page specifically has not been updated since 2015; is it up to date?).
Should we port these over into clang's docs (clang/docs/ThreadSanitizer.rst or another page in this directory)? Note: TSAN is not clang specific since it's supported in GCC, and the same wiki also has great docs on ASAN which is also supported by GCC.
I think it's possible, but google/sanitizers description of TSAN isn't entirely consistent with the current LLVM.
For example, regarding ShadowState, google/sanitizers describes it as 64-bit in ThreadSanitizerAlgorithm, but LLVM currently uses 32-bit.
struct Parts {
u8 access_;
Sid sid_;
u16 epoch_ : kEpochBits;
u16 is_read_ : 1;
u16 is_atomic_ : 1;
};
https://github.com/google/sanitizers/wiki/ThreadSanitizerAlgorithm mentions "we provide a high-level description of ThreadSanitizer (version 2) algorithm". LLVM uses TSan v3; there isn't much public documentation besides https://groups.google.com/g/thread-sanitizer/c/Gxnhk4l9TN8.