From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21917 invoked by alias); 17 Sep 2003 20:42:10 -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 21909 invoked from network); 17 Sep 2003 20:42:09 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 17 Sep 2003 20:42:09 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4F1162B89; Wed, 17 Sep 2003 16:42:05 -0400 (EDT) Message-ID: <3F68C71D.8010009@redhat.com> Date: Wed, 17 Sep 2003 20:42:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andreas Schwab Cc: gdb-patches@sources.redhat.com, Nick Clifton , Alan Modra Subject: Re: Fix hash table mixup in bfd_simple_get_relocated_section_content References: <20030917160957.GA9588@nevyn.them.org> <3F68A762.50601@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-09/txt/msg00380.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. If you can extract a "safe for GDB's branch" from Nick or Alan then it's approved. Andrew