Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Don't use obstack_empty_p
@ 2011-12-14 15:00 Andreas Schwab
  2011-12-14 18:56 ` Doug Evans
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2011-12-14 15:00 UTC (permalink / raw)
  To: gdb-patches

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);
 }
-- 
1.7.8


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-14 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-14 15:00 Don't use obstack_empty_p Andreas Schwab
2011-12-14 18:56 ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox