From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85397 invoked by alias); 2 Oct 2018 13:53:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 85352 invoked by uid 89); 2 Oct 2018 13:53:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:4.82 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Oct 2018 13:53:01 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7L6d-00044c-JW for gdb-patches@sourceware.org; Tue, 02 Oct 2018 09:53:00 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7L6d-00044U-E5; Tue, 02 Oct 2018 09:52:55 -0400 Received: from [176.228.60.248] (port=3571 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g7L6d-0006Qk-0T; Tue, 02 Oct 2018 09:52:55 -0400 Date: Tue, 02 Oct 2018 13:53:00 -0000 Message-Id: <83va6k3172.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey CC: gdb-patches@sourceware.org In-reply-to: <20181002044420.17628-11-tom@tromey.com> (message from Tom Tromey on Mon, 1 Oct 2018 22:44:20 -0600) Subject: Re: [PATCH v2 10/10] Add --enable-ubsan References: <20181002044420.17628-1-tom@tromey.com> <20181002044420.17628-11-tom@tromey.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00049.txt.bz2 > From: Tom Tromey > Cc: Tom Tromey > Date: Mon, 1 Oct 2018 22:44:20 -0600 > > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -103,6 +103,14 @@ CSKY GNU/LINUX csky*-*-linux > ** The gdb.Progspace type has a new 'objfiles' method, which returns the list > of objfiles associated to that program space. > > +* Configure changes > + > +--enable-ubsan > + > + Enable or disable the undefined behavior sanitizer. Release > + versions of gdb disable this by default, but development versions "GDB", capitalized, I guess? > --- a/gdb/README > +++ b/gdb/README > @@ -538,6 +538,13 @@ more obscure GDB `configure' options are not listed here. > the compiler, which will fail the compilation if the compiler > outputs any warning messages. > > +`--enable-ubsan' > + Enable the GCC undefined behavior sanitizer. By default this is > + disabled in GDB releases, but enabled when building from git. > + The undefined behavior sanitizer checks for C++ undefined > + behavior. It has a performance cost, so if you are looking at > + GDB's performance, you should disable it. Does this require some minimal version of g++? If so, I think we should mention that. And what about testing for this support at configure time? > + > +# ac_fn_cxx_try_link LINENO > +# ------------------------- > +# Try to link conftest.$ac_ext, and return whether this succeeded. > +ac_fn_cxx_try_link () > +{ > + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack > + rm -f conftest.$ac_objext conftest$ac_exeext > + if { { ac_try="$ac_link" > +case "(($ac_try" in > + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; > + *) ac_try_echo=$ac_try;; > +esac > +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" > +$as_echo "$ac_try_echo"; } >&5 > + (eval "$ac_link") 2>conftest.err > + ac_status=$? > + if test -s conftest.err; then > + grep -v '^ *+' conftest.err >conftest.er1 > + cat conftest.er1 >&5 > + mv -f conftest.er1 conftest.err > + fi > + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > + test $ac_status = 0; } && { > + test -z "$ac_cxx_werror_flag" || > + test ! -s conftest.err > + } && test -s conftest$ac_exeext && { > + test "$cross_compiling" = yes || > + test -x conftest$ac_exeext > + }; then : > + ac_retval=0 > +else > + $as_echo "$as_me: failed program was:" >&5 > +sed 's/^/| /' conftest.$ac_ext >&5 > + > + ac_retval=1 > +fi > + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information > + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would > + # interfere with the next link command; also delete a directory that is > + # left behind by Apple's compiler. We do this before executing the actions. > + rm -rf conftest.dSYM conftest_ipa8_conftest.oo > + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno > + as_fn_set_status $ac_retval > + > +} # ac_fn_cxx_try_link > cat >config.log <<_ACEOF > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. Is this hunk related to the issue at hand? The documentation parts are approved, with the above nits fixed. Thanks.