llvm-capstone/clang/test
Fangrui Song 5624e86ae0 [tsan] Respect !nosanitize metadata and remove gcov special case
Certain instrumentations set the !nosanitize metadata for inserted
instructions, which are generally not interested for sanitizers. Skip
tsan instrumentation like we do for asan (D126294)/msan/hwasan.

-fprofile-arcs instrumentation has data race unless
-fprofile-update=atomic is specified. Let's remove the the `__llvm_gcov`
special case from commit 0222adbcd2 (2016)
as the racy instructions have the !nosanitize metadata.
(-fprofile-arcs instrumentation does not use `__llvm_gcda` as global variables.)

```
std::atomic<int> c;
void foo() { c++; }
int main() {
  std::thread th(foo);
  c++;
  th.join();
}
```
Tested that `clang++ --coverage -fsanitize=thread a.cc && ./a.out` does
not report spurious tsan errors.

Also remove the default CC1 option -fprofile-update=atomic for
-fsanitize=thread to make options more orthogonal.

Reviewed By: Enna1

Differential Revision: https://reviews.llvm.org/D158385
2023-08-24 22:31:11 -07:00
..
Analysis [analyzer] Improve underflow handling in ArrayBoundV2 2023-08-21 17:17:02 +02:00
APINotes
ARCMT [clang][Verify] Show prefix in -verify error messages 2023-08-17 10:09:50 +02:00
AST Revert "[clang] - Add missing builtin name to AtomicExpr JSON dump" 2023-08-24 10:11:59 -07:00
ASTMerge
C No longer hang on typeof of a function type 2023-08-17 07:15:30 -04:00
clang-rename
ClangScanDeps
CodeCompletion Revert "[clang-repl] support code completion at a REPL." 2023-08-23 14:46:15 +00:00
CodeGen [tsan] Respect !nosanitize metadata and remove gcov special case 2023-08-24 22:31:11 -07:00
CodeGenCoroutines [Coroutines] [CoroElide] Don't think exceptional terminator don't leak coro handle unconditionally any more 2023-08-23 16:51:53 +08:00
CodeGenCUDA Added missing test constraints. 2023-08-18 11:39:11 -07:00
CodeGenCUDASPIRV
CodeGenCXX Revert "[Clang] CWG1473: do not err on the lack of space after operator""" 2023-08-22 18:10:41 -07:00
CodeGenHIP
CodeGenHLSL
CodeGenObjC
CodeGenObjCXX
CodeGenOpenCL AMDGPU: InstCombine amdgcn.sqrt.f16 to sqrt.f16 2023-08-23 20:30:40 -04:00
CodeGenOpenCLCXX
CodeGenSYCL
Coverage
CoverageMapping
CXX [clang] Properly print unnamed members in diagnostics 2023-08-24 07:24:29 -07:00
Driver [tsan] Respect !nosanitize metadata and remove gcov special case 2023-08-24 22:31:11 -07:00
ExtractAPI [clang][ExtractAPI] Fix bool spelling coming from the macro definition. 2023-08-22 15:00:14 -07:00
FixIt Revert "[Clang] CWG1473: do not err on the lack of space after operator""" 2023-08-22 18:10:41 -07:00
Format
Frontend clang: Make rewrite-includes-macros.cpp runnable on non-Win 2023-08-19 10:47:37 -04:00
Headers Reland "[HIP] Allow std::malloc in device function" 2023-08-24 19:59:20 -04:00
Import
Index [clang] Use RecoveryExprs for broken defaultargs, instead of OpaqueValueExprs 2023-08-16 10:22:16 +02:00
Integration
InterfaceStubs
Interpreter [clang-repl] Disambiguate declarations with private typedefs 2023-08-23 11:29:26 +02:00
Layout
Lexer
LibClang
Misc [X86] Support -march=gracemont 2023-08-21 08:49:01 +08:00
Modules Revert "[clang][modules] Move UNHASHED_CONTROL_BLOCK up in the AST file" 2023-08-24 14:43:23 -07:00
OpenMP [OpenMP 5.1] Parsing and Sema support for scope directive 2023-08-24 18:13:52 -07:00
Parser Revert "[Clang] CWG1473: do not err on the lack of space after operator""" 2023-08-22 18:10:41 -07:00
ParserHLSL
ParserSYCL
PCH Revert "[Clang] CWG1473: do not err on the lack of space after operator""" 2023-08-22 18:10:41 -07:00
Preprocessor [Driver] Cleanup last vestiges of Minix / Contiki support 2023-08-24 20:04:40 -04:00
Profile
Refactor
Rewriter
Sema [clang] Properly print unnamed members in diagnostics 2023-08-24 07:24:29 -07:00
SemaCUDA
SemaCXX [clang] Properly print unnamed members in diagnostics 2023-08-24 07:24:29 -07:00
SemaHLSL
SemaObjC Complete the implementation of P2361 Unevaluated string literals 2023-08-15 14:13:13 +02:00
SemaObjCXX [clang] Properly print unnamed members in diagnostics 2023-08-24 07:24:29 -07:00
SemaOpenCL
SemaOpenCLCXX [clang][AST] TextNodeDumper learned to output template specialization kind 2023-08-15 15:46:31 +00:00
SemaOpenMP
SemaSYCL
SemaTemplate Complete the implementation of P2361 Unevaluated string literals 2023-08-15 14:13:13 +02:00
TableGen
Templight
Tooling
Unit
utils/update_cc_test_checks
VFS Reland "[modules] Fix error about the same module being defined in different .pcm files when using VFS overlays." 2023-08-16 18:27:17 -07:00
.clang-format
CMakeLists.txt
lit.cfg.py Summary: 2023-08-22 16:29:22 -04:00
lit.site.cfg.py.in
TestRunner.sh