From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9967 invoked by alias); 27 Jul 2007 01:16:07 -0000 Received: (qmail 9955 invoked by uid 22791); 27 Jul 2007 01:16:07 -0000 X-Spam-Check-By: sourceware.org Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 27 Jul 2007 01:16:02 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l6R1FnWf010837; Thu, 26 Jul 2007 18:15:49 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Thu, 26 Jul 2007 18:15:49 -0700 (PDT) Message-ID: <24544.12.7.175.2.1185498949.squirrel@webmail.sonic.net> In-Reply-To: <20070727003622.GA12725@lucon.org> References: <22002.12.7.175.2.1185409273.squirrel@webmail.sonic.net> <20070726021855.GA29523@lucon.org> <20070726114139.GA15404@caradoc.them.org> <20070726130808.GA9417@lucon.org> <14727.12.7.175.2.1185475927.squirrel@webmail.sonic.net> <20070726191055.GA11301@lucon.org> <15312.12.7.175.2.1185492262.squirrel@webmail.sonic.net> <20070727003622.GA12725@lucon.org> Date: Fri, 27 Jul 2007 01:42:00 -0000 Subject: Re: [patch] coff-i386, guard against null From: msnyder@sonic.net To: "H.J. Lu" Cc: msnyder@sonic.net, binutils@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00481.txt.bz2 > On Thu, Jul 26, 2007 at 04:24:22PM -0700, msnyder@sonic.net wrote: >> > On Thu, Jul 26, 2007 at 11:52:07AM -0700, msnyder@sonic.net wrote: >> >> > On Thu, Jul 26, 2007 at 07:41:39AM -0400, Daniel Jacobowitz wrote: >> >> >> On Wed, Jul 25, 2007 at 07:18:55PM -0700, H.J. Lu wrote: >> >> >> > On Wed, Jul 25, 2007 at 05:21:13PM -0700, msnyder@sonic.net >> wrote: >> >> >> > > Other code in this function checks to see if sym is null. >> >> >> > > If it's null here, it'll fail. >> >> >> > > >> >> >> > >> >> >> > > 2007-07-25 Michael Snyder >> >> >> > > >> >> >> > > * coff-i386.c (coff_i386_rtype_to_howto): Guard against null. >> >> >> > > >> >> >> > >> >> >> > I prefer BFD_ASSERT (sym != NULL). >> >> >> >> >> >> BFD_ASSERT returns, though. >> >> > >> >> > I'd like to know when this condition happens. Crash is better than >> >> > silent return. That is how BFD_ASSERT is used other places. >> >> >> >> But it doesn't fix the problem that I set out to fix. >> >> If it returns, we'll still crash. >> >> >> >> H.J., the change I submitted is consistant with existing code >> >> in this module. There are six local uses of "if (x != NULL)", >> >> and only one local use of BFD_ASSERT. I don't mind if you want >> >> to add a BFD_ASSERT in addition, but why not let my change go in? >> > >> > OK with BFD_ASSERT. >> >> Sorry, I don't understand your reply. > > Your change is OK if you also add a BFD_ASSERT so that we will > know something is wrong. OK, committed. Thanks.