From: Raúl Marín Rodríguez Date: Mon, 19 Nov 2018 16:21:03 +0000 (+0000) Subject: Travis: Run CI under GCC's undefined behavior sanitizer X-Git-Tag: 3.0.0alpha1~274 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b5e2b01fe35a665045a592cc533da557214b296;p=postgis Travis: Run CI under GCC's undefined behavior sanitizer References #4244 Closes https://github.com/postgis/postgis/pull/335 git-svn-id: http://svn.osgeo.org/postgis/trunk@17034 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/.travis.yml b/.travis.yml index 418ec5db1..97761f5e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: - tag=latest mode=tests - tag=pg11-geos37-gdal23-proj52 mode=debug - tag=pg11-geos37-gdal23-proj52 mode=coverage + - tag=pg11-geos37-gdal23-proj52 mode=usan_gcc - tag=pg11-geos37-gdal23-proj52 mode=tests - tag=pg10-geos36-gdal23-proj49 mode=tests - tag=pg96-geos36-gdal22-proj49 mode=tests diff --git a/ci/travis/run_usan_gcc.sh b/ci/travis/run_usan_gcc.sh new file mode 100644 index 000000000..332006e5c --- /dev/null +++ b/ci/travis/run_usan_gcc.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -e + +# Enable undefined behaviour sanitizer using traps to +CFLAGS_STD="-g -O2 -mtune=generic -fno-omit-frame-pointer -fsanitize=undefined -fsanitize-undefined-trap-on-error" +LDFLAGS_STD="-Wl,-Bsymbolic-functions -Wl,-z,relro" + +/usr/local/pgsql/bin/pg_ctl -c -l /tmp/logfile start +./autogen.sh + +# Build with GCC and usan flags +# TODO: Fix topology ubsan +./configure CC=gcc CFLAGS="${CFLAGS_STD}" LDFLAGS="${LDFLAGS_STD}" --without-topology +bash ./ci/travis/logbt -- make -j check RUNTESTFLAGS=--verbose