From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27076 invoked by alias); 14 Dec 2011 14:56:54 -0000 Received: (qmail 27048 invoked by uid 22791); 14 Dec 2011 14:56:52 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Dec 2011 14:56:13 +0000 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id EEFC51C0C171 for ; Wed, 14 Dec 2011 15:56:11 +0100 (CET) X-Auth-Info: 2zkJpVRDiJqWC6s4YaAMnIk1Eo7P8npVehAVKWo0G9M= Received: from igel.home (ppp-88-217-105-12.dynamic.mnet-online.de [88.217.105.12]) by mail.mnet-online.de (Postfix) with ESMTPA id DFC881C00120 for ; Wed, 14 Dec 2011 15:56:11 +0100 (CET) Received: by igel.home (Postfix, from userid 501) id 504B4CA29C; Wed, 14 Dec 2011 15:56:11 +0100 (CET) From: Andreas Schwab To: gdb-patches@sourceware.org Subject: Don't use obstack_empty_p X-Yow: I selected E5... but I didn't hear ``Sam the Sham and the Pharaohs''! Date: Wed, 14 Dec 2011 15:00:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 X-SW-Source: 2011-12/txt/msg00452.txt.bz2 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 * 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."