summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-04-29 00:44:42 +0200
committerHaru <haru@dotalux.com>2016-04-29 00:44:42 +0200
commitf488476193e26615a1d29d56bc3ccf5b52aeffe4 (patch)
tree042ab36a74255890b41fc123bae1d8f7acac4488
parent8291fd8f291e71af418f2f988213a85618a993ed (diff)
parent709523366d3161cdc3d1416707a79ad4a9f54208 (diff)
downloadhercules-f488476193e26615a1d29d56bc3ccf5b52aeffe4.tar.gz
hercules-f488476193e26615a1d29d56bc3ccf5b52aeffe4.tar.bz2
hercules-f488476193e26615a1d29d56bc3ccf5b52aeffe4.tar.xz
hercules-f488476193e26615a1d29d56bc3ccf5b52aeffe4.zip
Merge pull request #1271 from 4144/sanity
Add new gcc sanitize flag -fsanitize=bounds-strict
-rwxr-xr-xconfigure50
-rw-r--r--configure.in1
2 files changed, 50 insertions, 1 deletions
diff --git a/configure b/configure
index ba2cc3815..a29752859 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in 367e95d.
+# From configure.in 8291fd8.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -5537,6 +5537,54 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=bounds-strict" >&5
+$as_echo_n "checking whether $CC supports -fsanitize=bounds-strict... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fsanitize=bounds-strict"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=bounds-strict"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC requires -fsanitize-undefined-trap-on-error for -fsanitize=bounds-strict" >&5
+$as_echo_n "checking whether $CC requires -fsanitize-undefined-trap-on-error for -fsanitize=bounds-strict... " >&6; }
+ CFLAGS="$CFLAGS -fsanitize-undefined-trap-on-error"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=object-size" >&5
$as_echo_n "checking whether $CC supports -fsanitize=object-size... " >&6; }
OLD_CFLAGS="$CFLAGS"
diff --git a/configure.in b/configure.in
index 848e055ea..3968dc568 100644
--- a/configure.in
+++ b/configure.in
@@ -728,6 +728,7 @@ if test "$enable_sanitize" != "no" ; then
AC_CHECK_SANITIZER_FLAG(return)
AC_CHECK_SANITIZER_FLAG(signed-integer-overflow)
AC_CHECK_SANITIZER_FLAG(bounds)
+ AC_CHECK_SANITIZER_FLAG(bounds-strict)
AC_CHECK_SANITIZER_FLAG(object-size)
AC_CHECK_SANITIZER_FLAG(float-divide-by-zero)
AC_CHECK_SANITIZER_FLAG(float-cast-overflow)