From: Doug Evans <dje@google.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: gdb-patches@sourceware.org
Subject: Re: Don't use obstack_empty_p
Date: Wed, 14 Dec 2011 18:56:00 -0000 [thread overview]
Message-ID: <CADPb22RsEia89yfPisW2DjDrfrnxzrrz6LWnu0CcK2M6LKncPQ@mail.gmail.com> (raw)
In-Reply-To: <m2ipljjj78.fsf@igel.home>
On Wed, Dec 14, 2011 at 6:56 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> The obstack implementation in glibc is has changed in a way so that the
> obstack_empty_p macro from libiberty's obstack.h can return the wrong
> value when applied to an obstack managed by glibc's obstack
> implementation. That results in an internal error in
> cp_merge_demangle_parse_infos. This is the only use of obstack_empty_p
> in the whole src tree (and gcc doesn't use it either), and no other
> macro in obstack.h is affected by this incompatibility. So I would
> suggest to just not use obstack_empty_p.
>
> Andreas.
>
> 2011-12-14 Andreas Schwab <schwab@linux-m68k.org>
>
> * cp-name-parser.y (cp_merge_demangle_parse_infos): Don't use
> obstack_empty_p.
>
> diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y
> index f257370..b0262f2 100644
> --- a/gdb/cp-name-parser.y
> +++ b/gdb/cp-name-parser.y
> @@ -2029,9 +2029,6 @@ cp_merge_demangle_parse_infos (struct demangle_parse_info *dest,
> cp_demangled_parse_info_free is called. */
> src->info = NULL;
>
> - /* Assert if the SRC obstack is not empty. */
> - gdb_assert (obstack_empty_p (&src->obstack));
> -
> /* Free SRC. */
> cp_demangled_name_parse_free (src);
> }
LGTM
prev parent reply other threads:[~2011-12-14 18:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 15:00 Andreas Schwab
2011-12-14 18:56 ` Doug Evans [this message]
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=CADPb22RsEia89yfPisW2DjDrfrnxzrrz6LWnu0CcK2M6LKncPQ@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=schwab@linux-m68k.org \
/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