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
- 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
--- /dev/null
+#!/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