]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Disable the undefined behavior sanitizer by default
authorTom Tromey <tom@tromey.com>
Tue, 9 Oct 2018 17:51:33 +0000 (11:51 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 9 Oct 2018 17:51:33 +0000 (11:51 -0600)
There have been a few undefined behavior failures reported, and Pedro
suggested that the sanitizer be disabled by default.  This patch
implements this.

gdb/ChangeLog
2018-10-09  Tom Tromey  <tom@tromey.com>

* configure: Rebuild.
* sanitize.m4 (AM_GDB_UBSAN): Default to no.
* NEWS: Update --enable-ubsan documentation.

gdb/doc/ChangeLog
2018-10-09  Tom Tromey  <tom@tromey.com>

* gdb.texinfo (Configure Options): Update --enable-ubsan
documentation.

gdb/ChangeLog
gdb/NEWS
gdb/configure
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/sanitize.m4

index f37070ea4841fe00a6d0c0e873bf83278d260a4f..f9e56be46da738f0653054253fef237c89f5ab50 100644 (file)
@@ -1,3 +1,9 @@
+2018-10-09  Tom Tromey  <tom@tromey.com>
+
+       * configure: Rebuild.
+       * sanitize.m4 (AM_GDB_UBSAN): Default to no.
+       * NEWS: Update --enable-ubsan documentation.
+
 2018-10-09  Gary Benson <gbenson@redhat.com>
 
        * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
index 8a0dd52fa7f32140bca64e5958870e840b044a3b..126e61e282a6b1e4224cb8f4c9b472c88f0c4173 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -122,11 +122,11 @@ FreeBSD/riscv                     riscv*-*-freebsd*
 
 --enable-ubsan
 
-  Enable or disable the undefined behavior sanitizer.  Release
-  versions of GDB disable this by default if it is available, but
-  development versions enable it.  Enabling this can cause a
-  performance penalty.  The undefined behavior sanitizer was first
-  introduced in GCC 4.9.
+  Enable or disable the undefined behavior sanitizer.  This is
+  disabled by default, but passing --enable-ubsan=yes or
+  --enable-ubsan=auto to configure will enable it.  Enabling this can
+  cause a performance penalty.  The undefined behavior sanitizer was
+  first introduced in GCC 4.9.
 
 *** Changes in GDB 8.2
 
index 304adc81fec305b9bf5c461c78d7ee2bad00a495..adb26e5d4d3fa30ea5e374746133f511e4c5ac17 100755 (executable)
@@ -15614,7 +15614,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test "${enable_ubsan+set}" = set; then :
   enableval=$enable_ubsan;
 else
-  enable_ubsan=auto
+  enable_ubsan=no
 fi
 
 if test "x$enable_ubsan" = xauto; then
index a3aace7d6bc87904ad6966b2cb1d8b59c6de5376..c67798399f2e66dd54986b41873d2c2329643b3b 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-09  Tom Tromey  <tom@tromey.com>
+
+       * gdb.texinfo (Configure Options): Update --enable-ubsan
+       documentation.
+
 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
 
        * gdb.texinfo (Contributors): Add SRI International and University
index efd6dffb1e5d18ebd2cb1bfb488740732d9f69a9..b0dc3bf67c12f6f43d3dabc9e0a74fb8c46ce408 100644 (file)
@@ -35771,12 +35771,13 @@ to the compiler, which will fail the compilation if the compiler
 outputs any warning messages.
 
 @item --enable-ubsan
-Enable the GCC undefined behavior sanitizer.  By default this is
-disabled in @value{GDBN} releases, but enabled, when available, when
-building from git.  The undefined behavior sanitizer checks for
-C@t{++} undefined behavior.  It has a performance cost, so if you are
-looking at @value{GDBN}'s performance, you should disable it.  The
-undefined behavior sanitizer was first introduced in GCC 4.9.
+Enable the GCC undefined behavior sanitizer.  This is disabled by
+default, but passing @code{--enable-ubsan=yes} or
+@code{--enable-ubsan=auto} to @code{configure} will enable it.  The
+undefined behavior sanitizer checks for C@t{++} undefined behavior.
+It has a performance cost, so if you are looking at @value{GDBN}'s
+performance, you should disable it.  The undefined behavior sanitizer
+was first introduced in GCC 4.9.
 @end table
 
 @node System-wide configuration
index 76df44da4fe9d6bf374d686a1ec49e3da3e1f4e1..979f6461c0dea488d66f0cc9f825027370f814ec 100644 (file)
@@ -20,7 +20,7 @@ AC_DEFUN([AM_GDB_UBSAN],[
 AC_ARG_ENABLE(ubsan,
   AS_HELP_STRING([--enable-ubsan],
                  [enable undefined behavior sanitizer (auto/yes/no)]),
-  [],enable_ubsan=auto)
+  [],enable_ubsan=no)
 if test "x$enable_ubsan" = xauto; then
   if $development; then
     enable_ubsan=yes