[postgis-tickets] r17034 - Travis: Run CI under GCC's undefined behavior sanitizer

Raul raul at rmr.ninja
Mon Nov 19 08:21:03 PST 2018


Author: algunenano
Date: 2018-11-19 08:21:03 -0800 (Mon, 19 Nov 2018)
New Revision: 17034

Added:
   trunk/ci/travis/run_usan_gcc.sh
Modified:
   trunk/.travis.yml
Log:
Travis: Run CI under GCC's undefined behavior sanitizer

References #4244
Closes https://github.com/postgis/postgis/pull/335
 


Modified: trunk/.travis.yml
===================================================================
--- trunk/.travis.yml	2018-11-19 14:27:33 UTC (rev 17033)
+++ trunk/.travis.yml	2018-11-19 16:21:03 UTC (rev 17034)
@@ -8,6 +8,7 @@
   - 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

Added: trunk/ci/travis/run_usan_gcc.sh
===================================================================
--- trunk/ci/travis/run_usan_gcc.sh	                        (rev 0)
+++ trunk/ci/travis/run_usan_gcc.sh	2018-11-19 16:21:03 UTC (rev 17034)
@@ -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



More information about the postgis-tickets mailing list