Skip to content

Commit b9381f8

Browse files
committed
Set -fno-sanitize-recover=all compiler option
If sanitizer detects an error, it will lead to a non-zero exit code.
1 parent dfbfd92 commit b9381f8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.github/workflows/gha.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,30 @@ jobs:
4141
export ARCH="64"
4242
export CHAR_SIGN="unsigned"
4343
export API_VERSION="1"
44-
export SANITIZE="-fsanitize=undefined"
44+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
4545
fi
4646
if [ ${{ matrix.pattern }} == 1 ]; then
4747
ACTION="ci/build_cmake.sh"
4848
export CXX17="ON"
4949
export ARCH="64"
5050
export CHAR_SIGN="signed"
5151
export API_VERSION="3"
52-
export SANITIZE="-fsanitize=undefined"
52+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
5353
fi
5454
if [ ${{ matrix.pattern }} == 2 ]; then
5555
ACTION="ci/build_cmake.sh"
5656
export CXX17="ON"
5757
export ARCH="64"
5858
export CHAR_SIGN="signed"
5959
export API_VERSION="2"
60-
export SANITIZE="-fsanitize=undefined"
60+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
6161
fi
6262
if [ ${{ matrix.pattern }} == 3 ]; then
6363
ACTION="ci/build_cmake.sh"
6464
export ARCH="64"
6565
export CHAR_SIGN="unsigned"
6666
export API_VERSION="2"
67-
export SANITIZE="-fsanitize=undefined"
67+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
6868
fi
6969
7070
# install gtest
@@ -118,15 +118,15 @@ jobs:
118118
export ARCH="64"
119119
export CHAR_SIGN="unsigned"
120120
export API_VERSION="2"
121-
export SANITIZE="-fsanitize=undefined"
121+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
122122
fi
123123
if [ ${{ matrix.pattern }} == 1 ]; then
124124
export CXX=clang++
125125
ACTION="ci/build_cmake.sh"
126126
export ARCH="32"
127127
export CHAR_SIGN="signed"
128128
export API_VERSION="2"
129-
export SANITIZE="-fsanitize=undefined"
129+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
130130
fi
131131
if [ ${{ matrix.pattern }} == 2 ]; then
132132
export CXX=clang++
@@ -136,7 +136,7 @@ jobs:
136136
export CHAR_SIGN="signed"
137137
export API_VERSION="3"
138138
export X3_PARSE="ON"
139-
export SANITIZE="-fsanitize=undefined"
139+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
140140
fi
141141
if [ ${{ matrix.pattern }} == 3 ]; then
142142
export CXX=clang++
@@ -153,7 +153,7 @@ jobs:
153153
export ARCH="64"
154154
export CHAR_SIGN="signed"
155155
export API_VERSION="2"
156-
export SANITIZE="-fsanitize=undefined"
156+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
157157
fi
158158
if [ ${{ matrix.pattern }} == 5 ]; then
159159
export CXX=g++
@@ -163,31 +163,31 @@ jobs:
163163
export CHAR_SIGN="unsigned"
164164
export API_VERSION="3"
165165
export X3_PARSE="ON"
166-
export SANITIZE="-fsanitize=undefined"
166+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
167167
fi
168168
if [ ${{ matrix.pattern }} == 6 ]; then
169169
export CXX=g++
170170
ACTION="ci/build_cmake.sh"
171171
export ARCH="64"
172172
export CHAR_SIGN="unsigned"
173173
export API_VERSION="2"
174-
export SANITIZE="-fsanitize=undefined"
174+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
175175
fi
176176
if [ ${{ matrix.pattern }} == 7 ]; then
177177
export CXX=g++
178178
ACTION="ci/build_cmake.sh"
179179
export ARCH="32"
180180
export CHAR_SIGN="signed"
181181
export API_VERSION="1"
182-
export SANITIZE="-fsanitize=undefined"
182+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
183183
fi
184184
if [ ${{ matrix.pattern }} == 8 ]; then
185185
export CXX=g++
186186
ACTION="ci/build_cmake.sh"
187187
export ARCH="32"
188188
export CHAR_SIGN="signed"
189189
export API_VERSION="2"
190-
export SANITIZE="-fsanitize=undefined"
190+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
191191
fi
192192
if [ ${{ matrix.pattern }} == 9 ]; then
193193
export CXX=clang++
@@ -196,7 +196,7 @@ jobs:
196196
export SAN="UBSAN"
197197
export MSGPACK_FUZZ_REGRESSION="ON"
198198
export CTEST_OUTPUT_ON_FAILURE=1
199-
export SANITIZE="-fsanitize=undefined"
199+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
200200
fi
201201
if [ ${{ matrix.pattern }} == 10 ]; then
202202
export CXX=clang++
@@ -205,7 +205,7 @@ jobs:
205205
export SAN="ASAN"
206206
export MSGPACK_FUZZ_REGRESSION="ON"
207207
export CTEST_OUTPUT_ON_FAILURE=1
208-
export SANITIZE="-fsanitize=undefined"
208+
export SANITIZE="-fsanitize=undefined -fno-sanitize-recover=all"
209209
fi
210210
211211
# install gtest

0 commit comments

Comments
 (0)