Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbd82928

Browse files
committed
ci: Use -fsanitize=undefined,alignment,address in linux tasks
We have coverage of the various sanitizers in the buildfarm. The sanitizershowever particularly interesting during the development of patches, where thelikelihood of bugs is even higher. There also have been complaints about onlyseeing such failures on the buildfarm, rather than before commit.This commit enables a reasonable set of sanitizers in CI. Use the linux taskfor that, as it currently is one of the fastests tasks. Also several of thesanitizers work best on linux.The overhead of alignment sanitizer is low, undefined behaviour has moderateoverhead. Test alignment sanitizer in the meson task, as it does both 32 and64 bit builds and is thus more likely to expose alignment bugs.Address sanitizer in contrast somewhat expensive. Enable it in the autoconftask, as the meson task tests both 32 and 64bit which would exacerbate thecost.Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>Discussion:https://postgr.es/m/20220323173537.ll7klrglnp4gn2um@alap3.anarazel.deDiscussion:https://postgr.es/m/20221121220903.kf5u7rokfzbmqskm@alap3.anarazel.de
1 parent94a3e02 commitbd82928

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

‎.cirrus.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,28 @@ task:
235235
CCACHE_DIR:/tmp/ccache_dir
236236
DEBUGINFOD_URLS:"https://debuginfod.debian.net"
237237

238-
CFLAGS:-Og -ggdb
239-
CXXFLAGS:-Og -ggdb
238+
# Enable a reasonable set of sanitizers. Use the linux task for that, as
239+
# it one of the fastest tasks (without sanitizers). Also several of the
240+
# sanitizers work best on linux.
241+
#
242+
# The overhead of alignment sanitizer is low, undefined behaviour has
243+
# moderate overhead. Test alignment sanitizer in the meson task, as it
244+
# does both 32 and 64 bit builds and is thus more likely to expose
245+
# alignment bugs.
246+
#
247+
# Address sanitizer in contrast is somewhat expensive. Enable it in the
248+
# autoconf task, as the meson task tests both 32 and 64bit.
249+
#
250+
# disable_coredump=0, abort_on_error=1: for useful backtraces in case of crashes
251+
# print_stacktraces=1,verbosity=2, duh
252+
# detect_leaks=0: too many uninteresting leak errors in short-lived binaries
253+
UBSAN_OPTIONS:print_stacktrace=1:disable_coredump=0:abort_on_error=1:verbosity=2
254+
ASAN_OPTIONS:print_stacktrace=1:disable_coredump=0:abort_on_error=1:detect_leaks=0
255+
256+
# SANITIZER_FLAGS is set in the tasks below
257+
CFLAGS:-Og -ggdb -fno-sanitize-recover=all $SANITIZER_FLAGS
258+
CXXFLAGS:$CFLAGS
259+
LDFLAGS:$SANITIZER_FLAGS
240260
CC:ccache gcc
241261
CXX:ccache g++
242262

@@ -280,6 +300,9 @@ task:
280300
matrix:
281301
-name:Linux - Debian Bullseye - Autoconf
282302

303+
env:
304+
SANITIZER_FLAGS:-fsanitize=address
305+
283306
configure_script:|
284307
su postgres <<-EOF
285308
./configure \
@@ -306,6 +329,7 @@ task:
306329

307330
env:
308331
CCACHE_MAXSIZE:"400M"# tests two different builds
332+
SANITIZER_FLAGS:-fsanitize=alignment,undefined
309333

310334
configure_script:|
311335
su postgres <<-EOF

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp