@@ -17,14 +17,15 @@ jobs:
17
17
pool_tracking : ['ON', 'OFF']
18
18
shared_library : ['OFF']
19
19
os_provider : ['ON']
20
+ sanitizers : [{asan: 'OFF', ubsan: 'OFF', tsan: 'OFF'}]
20
21
include :
21
22
- os : ' ubuntu-20.04'
22
23
build_type : Release
23
24
compiler : {c: gcc-7, cxx: g++-7}
24
25
shared_library : ' OFF'
25
26
- os : ' ubuntu-22.04'
26
27
build_type : Release
27
- compiler : {c: clang, cxx: clang++}
28
+ compiler : {c: clang, cxx: clang++}
28
29
shared_library : ' OFF'
29
30
- os : ' ubuntu-22.04'
30
31
build_type : Release
@@ -42,17 +43,34 @@ jobs:
42
43
compiler : {c: gcc, cxx: g++}
43
44
shared_library : ' OFF'
44
45
os_provider : ' OFF'
46
+ # TODO: Enable sanitizer checks with pool tracking enabled. There's
47
+ # a leak reported by sanitizer in jemalloc pool implementation that
48
+ # points to a tracker_value_t not being free'd.
49
+ # TODO: Move jobs with sanitizer checks to a separate workflow file.
50
+ - os : ' ubuntu-22.04'
51
+ build_type : Debug
52
+ compiler : {c: clang, cxx: clang++}
53
+ pool_tracking : ' OFF'
54
+ shared_library : ' OFF'
55
+ # TSAN is mutually exclusive with other sanitizers
56
+ sanitizers : [{asan: 'ON', ubsan: 'ON', tsan: 'OFF'}, {asan: 'OFF', ubsan: 'OFF', tsan: 'ON'}]
57
+ - os : ' ubuntu-22.04'
58
+ build_type : Debug
59
+ compiler : {c: gcc, cxx: g++}
60
+ pool_tracking : ' OFF'
61
+ shared_library : ' OFF'
62
+ sanitizers : [{asan: 'ON', ubsan: 'ON', tsan: 'OFF'}, {asan: 'OFF', ubsan: 'OFF', tsan: 'ON'}]
45
63
runs-on : ${{matrix.os}}
46
64
47
65
steps :
48
66
- name : Checkout
49
67
uses : actions/checkout@v4
50
-
68
+
51
69
- name : Install apt packages
52
70
run : |
53
71
sudo apt-get update
54
72
sudo apt-get install -y clang cmake libnuma-dev libjemalloc-dev libtbb-dev
55
-
73
+
56
74
- name : Install g++-7
57
75
if : matrix.compiler.cxx == 'g++-7'
58
76
run : |
@@ -74,11 +92,14 @@ jobs:
74
92
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
75
93
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
76
94
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
95
+ -DUSE_ASAN=${{matrix.sanitizers.asan}}
96
+ -DUSE_UBSAN=${{matrix.sanitizers.ubsan}}
97
+ -DUSE_TSAN=${{matrix.sanitizers.tsan}}
77
98
78
99
- name : Build UMF
79
100
run : |
80
101
cmake --build ${{env.BUILD_DIR}} -j $(nproc)
81
-
102
+
82
103
- name : Run tests
83
104
working-directory : ${{env.BUILD_DIR}}
84
105
run : |
@@ -102,6 +123,7 @@ jobs:
102
123
compiler : [{c: cl, cxx: cl}]
103
124
pool_tracking : ['ON', 'OFF']
104
125
shared_library : ['OFF']
126
+ sanitizers : [{asan: 'OFF'}]
105
127
include :
106
128
- os : ' windows-2022'
107
129
build_type : Release
@@ -113,6 +135,19 @@ jobs:
113
135
compiler : {c: cl, cxx: cl}
114
136
pool_tracking : ' ON'
115
137
shared_library : ' ON'
138
+ - os : ' windows-2022'
139
+ build_type : Debug
140
+ compiler : {c: clang-cl, cxx: clang-cl}
141
+ pool_tracking : ' OFF'
142
+ shared_library : ' OFF'
143
+ sanitizers : [{asan: 'ON'}]
144
+ - os : ' windows-2022'
145
+ build_type : Debug
146
+ compiler : {c: cl, cxx: cl}
147
+ pool_tracking : ' OFF'
148
+ shared_library : ' OFF'
149
+ sanitizers : [{asan: 'ON'}]
150
+
116
151
runs-on : ${{matrix.os}}
117
152
118
153
steps :
@@ -130,6 +165,7 @@ jobs:
130
165
-DUMF_FORMAT_CODE_STYLE=OFF
131
166
-DUMF_DEVELOPER_MODE=ON
132
167
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
168
+ -DUSE_ASAN=${{matrix.sanitizers.asan}}
133
169
134
170
- name : Build UMF
135
171
run : cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
@@ -160,7 +196,7 @@ jobs:
160
196
-DUMF_DEVELOPER_MODE=ON
161
197
-DUMF_ENABLE_POOL_TRACKING=ON
162
198
163
- - name : Run code-style check
199
+ - name : Run code-style check
164
200
run : |
165
201
cmake --build ${{env.BUILD_DIR}} --target clang-format-check
166
202
0 commit comments