-
Notifications
You must be signed in to change notification settings - Fork 1
144 lines (117 loc) · 3.38 KB
/
Copy pathsanitizers.yml
File metadata and controls
144 lines (117 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Sanitizers
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
asan:
name: AddressSanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-12 g++-12 libomp-dev
- name: Configure CMake with ASan
env:
CC: gcc-12
CXX: g++-12
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_ASAN=ON
- name: Build
run: cmake --build build
- name: Run Tests with ASan
working-directory: build
env:
ASAN_OPTIONS: detect_leaks=1:abort_on_error=1
run: ctest --output-on-failure --timeout 600
tsan:
name: ThreadSanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-12 g++-12 libomp-dev
- name: Configure CMake with TSan
env:
CC: gcc-12
CXX: g++-12
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_TSAN=ON
- name: Build
run: cmake --build build
- name: Run Tests with TSan
working-directory: build
env:
TSAN_OPTIONS: abort_on_error=1:halt_on_error=1
run: |
# Run concurrency tests specifically
ctest -R "concurrency|atomic|lock_free" --output-on-failure --timeout 600 || true
# Run other tests
ctest -E "concurrency|atomic|lock_free" --output-on-failure --timeout 600
ubsan:
name: UndefinedBehaviorSanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-12 g++-12 libomp-dev
- name: Configure CMake with UBSan
env:
CC: gcc-12
CXX: g++-12
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_UBSAN=ON
- name: Build
run: cmake --build build
- name: Run Tests with UBSan
working-directory: build
env:
UBSAN_OPTIONS: print_stacktrace=1:abort_on_error=1
run: ctest --output-on-failure --timeout 600
msan:
name: MemorySanitizer (Clang only)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang-15 libc++-15-dev libc++abi-15-dev
- name: Configure CMake with MSan
env:
CC: clang-15
CXX: clang++-15
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-fsanitize=memory -fno-omit-frame-pointer -stdlib=libc++"
- name: Build
run: cmake --build build || true # MSan can be tricky with dependencies
- name: Run Tests with MSan
working-directory: build
env:
MSAN_OPTIONS: abort_on_error=1
run: ctest --output-on-failure --timeout 600 || true
continue-on-error: true # MSan may have false positives with system libraries