aboutsummaryrefslogtreecommitdiff
path: root/projects/gdal
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-08-22 17:44:31 +0200
committerjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2019-08-22 11:44:31 -0400
commit79aac7941e035fadec08ae50013cc487eaf6d44b (patch)
tree83293c09b6d8905fb56f7b37e8c97c8e341c286a /projects/gdal
parentebd914fb802b94b41a9e93d2fa1df97eb69e5483 (diff)
downloadoss-fuzz-79aac7941e035fadec08ae50013cc487eaf6d44b.tar.gz
[GDAL] Enable unsigned-integer-overflow (#2747)
GDAL regression test suite now passes with this, and some local testing of it for ossfuzz is encouraging, so let's enable that.
Diffstat (limited to 'projects/gdal')
-rwxr-xr-xprojects/gdal/build.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/projects/gdal/build.sh b/projects/gdal/build.sh
index 789af4548..ee72fd1bb 100755
--- a/projects/gdal/build.sh
+++ b/projects/gdal/build.sh
@@ -102,6 +102,12 @@ make install
cd ../..
# build gdal
+
+if [ "$SANITIZER" = "undefined" ]; then
+ CFLAGS="$CFLAGS -fsanitize=unsigned-integer-overflow -fno-sanitize-recover=unsigned-integer-overflow"
+ CXXFLAGS="$CXXFLAGS -fsanitize=unsigned-integer-overflow -fno-sanitize-recover=unsigned-integer-overflow"
+fi
+
cd gdal
export LDFLAGS=${CXXFLAGS}
PKG_CONFIG_PATH=$SRC/install/lib/pkgconfig ./configure --without-libtool --with-liblzma --with-expat --with-sqlite3 --with-xerces --with-webp --with-netcdf=$SRC/install --with-curl=$SRC/install/bin/curl-config --without-hdf5 --with-jpeg=internal --with-proj=$SRC/install --with-poppler