Skip to content

Commit 480a1b3

Browse files
committed
build.yml: added sanitized build with UndefinedBehaviorSanitizer
1 parent 9e1a8d7 commit 480a1b3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ jobs:
7070
CFLAGS: "-fsanitize=address -ggdb"
7171
LDFLAGS: "-fsanitize=address"
7272

73+
- CC: clang
74+
feature_set: max
75+
arch: amd64
76+
os: ubuntu-latest
77+
unittests: true
78+
DISTCHECK: false
79+
name_extra: and UndefinedBehaviorSanitized
80+
# -fsanitize=nullability is only available for Clang
81+
CFLAGS: "-fsanitize=undefined -fsanitize=nullability -ggdb"
82+
LDFLAGS: "-fsanitize=undefined -fsanitize=nullability"
83+
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1:report_error_type=1
84+
7385
# Maximal debug 64-bit arch builds
7486
# Check we can also do a static build without
7587
# installing .a files
@@ -119,6 +131,7 @@ jobs:
119131
CC: ${{ matrix.CC }}
120132
CFLAGS: ${{ matrix.CFLAGS }}
121133
LDFLAGS: ${{ matrix.LDFLAGS }}
134+
UBSAN_OPTIONS: ${{ matrix.UBSAN_OPTIONS }}
122135

123136
# HACK (2020-11-16): github actions doesn't support YAML anchors/aliases to
124137
# avoid repeating long config values. So instead the config values are defined

0 commit comments

Comments
 (0)