From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25974 invoked by alias); 17 Sep 2003 19:41:07 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25957 invoked from network); 17 Sep 2003 19:41:06 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sources.redhat.com with SMTP; 17 Sep 2003 19:41:06 -0000 Received: from Hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 40FC8161AC6C; Wed, 17 Sep 2003 21:41:06 +0200 (CEST) To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: Fix hash table mixup in bfd_simple_get_relocated_section_content References: <20030917160957.GA9588@nevyn.them.org> <3F68A762.50601@redhat.com> From: Andreas Schwab X-Yow: Is this the line for the latest whimsical YUGOSLAVIAN drama which also makes you want to CRY and reconsider the VIETNAM WAR? Date: Wed, 17 Sep 2003 19:41:00 -0000 In-Reply-To: <3F68A762.50601@redhat.com> (Andrew Cagney's message of "Wed, 17 Sep 2003 14:26:42 -0400") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-09/txt/msg00378.txt.bz2 Andrew Cagney writes: >> Daniel Jacobowitz writes: >> >>> On Wed, Sep 17, 2003 at 06:04:05PM +0200, Andreas Schwab wrote: >> >>>> bfd_simple_get_relocated_section_content uses the generic linker >>>> interface, so it should also use the generic_link_hash_table. >> >>> >>> Hmm, this seems right to me. >> Posted now to binutils@ where it belongs, but I think this should be >> added to gdb-6.0 because it also affects add-symbol. > > Grrrr :-) > > What's the damage without it? You can get random crashes in generic_link_add_symbol_list because _bfd_generic_link_add_one_symbol hands out a bfd_link_hash_entry, but a generic_link_hash_entry is expected, and h->sym remains uninitialized. The specific case where it happend was gdb debugging a user mode linux process, and applying add-symbol to a kernel module. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."