@@ -135,6 +135,7 @@ jobs:
135
135
compiler : [{c: cl, cxx: cl}]
136
136
pool_tracking : ['ON', 'OFF']
137
137
shared_library : ['OFF']
138
+ sanitizers : [{asan: OFF}]
138
139
include :
139
140
- os : ' windows-2022'
140
141
build_type : Release
@@ -146,12 +147,36 @@ jobs:
146
147
compiler : {c: cl, cxx: cl}
147
148
pool_tracking : ' ON'
148
149
shared_library : ' ON'
150
+ - os : ' windows-2022'
151
+ build_type : Debug
152
+ compiler : {c: cl, cxx: cl}
153
+ pool_tracking : ' OFF'
154
+ shared_library : ' OFF'
155
+ sanitizers : {asan: ON}
156
+ - os : ' windows-2022'
157
+ build_type : Debug
158
+ compiler : {c: clang-cl, cxx: clang-cl}
159
+ pool_tracking : ' OFF'
160
+ shared_library : ' OFF'
161
+ sanitizers : {asan: ON}
149
162
150
163
runs-on : ${{matrix.os}}
151
164
152
165
steps :
153
166
- uses : actions/checkout@v4
154
167
168
+ # Use '14.38.33130' MSVC toolset when compiling UMF with ASan.
169
+ # Running binaries compiled with older toolsets results in a
170
+ # 'STATUS_DLL_INIT_FAILED' error despite being linked with ASan from
171
+ # the same toolset as the compiler being used.
172
+ # https://github.com/actions/runner-images/issues/8891
173
+ - name : Setup MSVC dev command prompt
174
+ if : matrix.os == 'windows-2022' && matrix.sanitizers.asan == 'ON'
175
+ uses : TheMrMilchmann/setup-msvc-dev@v3
176
+ with :
177
+ arch : x64
178
+ toolset : 14.38.33130
179
+
155
180
- name : Configure build
156
181
run : >
157
182
cmake
@@ -164,6 +189,7 @@ jobs:
164
189
-DUMF_FORMAT_CODE_STYLE=OFF
165
190
-DUMF_DEVELOPER_MODE=ON
166
191
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
192
+ -DUSE_ASAN=${{matrix.sanitizers.asan}}
167
193
168
194
- name : Build UMF
169
195
run : cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
0 commit comments