From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 10/10] Add --enable-ubsan
Date: Tue, 02 Oct 2018 13:53:00 -0000 [thread overview]
Message-ID: <83va6k3172.fsf@gnu.org> (raw)
In-Reply-To: <20181002044420.17628-11-tom@tromey.com> (message from Tom Tromey on Mon, 1 Oct 2018 22:44:20 -0600)
> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>
> 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.
next prev parent reply other threads:[~2018-10-02 13:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 4:44 [PATCH v2 00/10] Undefined Behavior Sanitizer, this time with docs Tom Tromey
2018-10-02 4:44 ` [PATCH v2 05/10] Avoid undefined behavior in read_subrange_type Tom Tromey
2018-10-02 4:44 ` [PATCH v2 01/10] Do not pass NULL to memcpy Tom Tromey
2018-10-02 4:44 ` [PATCH v2 03/10] Use unsigned as base type for some enums Tom Tromey
2018-10-03 17:33 ` Pedro Alves
2018-10-03 21:07 ` Tom Tromey
2018-10-02 4:44 ` [PATCH v2 06/10] Avoid undefined behavior in parse_number Tom Tromey
2018-10-02 4:44 ` [PATCH v2 07/10] Avoid undefined behavior in read_signed_leb128 Tom Tromey
2018-10-02 4:44 ` [PATCH v2 02/10] Change dwarf2_frame_state_reg_info::reg to be std::vector Tom Tromey
2018-10-03 17:28 ` Pedro Alves
2018-10-03 21:05 ` Tom Tromey
2018-10-02 4:44 ` [PATCH v2 08/10] Avoid undefined behavior in ada_operator_length Tom Tromey
2018-10-02 4:44 ` [PATCH v2 09/10] Avoid undefined behavior in expression dumping Tom Tromey
2018-10-03 17:48 ` Pedro Alves
2018-10-02 4:44 ` [PATCH v2 04/10] Avoid undefined behavior in extract_integer Tom Tromey
2018-10-02 4:44 ` [PATCH v2 10/10] Add --enable-ubsan Tom Tromey
2018-10-02 13:53 ` Eli Zaretskii [this message]
2018-10-02 21:26 ` Tom Tromey
2018-10-02 21:28 ` Tom Tromey
2018-10-03 17:31 ` Eli Zaretskii
2018-10-03 17:54 ` Pedro Alves
2018-10-03 21:09 ` Tom Tromey
2018-10-03 17:57 ` [PATCH v2 00/10] Undefined Behavior Sanitizer, this time with docs Pedro Alves
2018-10-03 21:09 ` Tom Tromey
2018-10-08 19:14 ` John Baldwin
2018-10-08 20:22 ` Joel Brobecker
2018-10-09 10:44 ` Pedro Alves
2018-10-12 21:07 ` Joel Brobecker
-- strict thread matches above, loose matches on Subject: below --
2018-08-30 2:44 [PATCH v2 00/10] Enable undefined behavior sanitizer Tom Tromey
2018-08-30 2:44 ` [PATCH v2 10/10] Add --enable-ubsan Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83va6k3172.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).