[clang] [clang][docs] Document ThreadSanitizer run-time flags and suppressions (PR #205761)

Alexander Potapenko via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 25 03:39:46 PDT 2026


================
@@ -187,6 +198,24 @@ Limitations
   ``fsanitize=thread`` flag will cause Clang to act as though the ``-fPIE``
   flag had been supplied if compiling without ``-fPIC``, and as though the
   ``-pie`` flag had been supplied if linking an executable.
+* ThreadSanitizer does not support C++ exceptions. Programs relying heavily on
----------------
ramosian-glider wrote:

What do you think of:

```
ThreadSanitizer has limited support for C++ exceptions. While the compiler
  pass inserts cleanup landing pads to call exit hooks during stack unwinding,
  exceptions propagating through any uninstrumented code (such as precompiled
  system libraries or standard libraries not rebuilt with ThreadSanitizer)
  will bypass these hooks. This causes shadow stack desynchronization, leading
  to corrupted stack traces in reports, false positives, or other unreliable
  behaviors.
```

Although Kuba added exceptions support in 2016 (b0dd454a1aab173c1d951b1b614b07d851d894cd), I think it might be too daring to claim full support of all corner cases.

https://github.com/llvm/llvm-project/pull/205761


More information about the cfe-commits mailing list