From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19733 invoked by alias); 27 Jul 2007 01:42:18 -0000 Received: (qmail 19725 invoked by uid 22791); 27 Jul 2007 01:42:17 -0000 X-Spam-Check-By: sourceware.org Received: from a.mail.sonic.net (HELO a.mail.sonic.net) (64.142.16.245) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 27 Jul 2007 01:42:14 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l6R1g1aW014101; Thu, 26 Jul 2007 18:42:01 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Thu, 26 Jul 2007 18:42:01 -0700 (PDT) Message-ID: <4869.12.7.175.2.1185500521.squirrel@webmail.sonic.net> In-Reply-To: <20070726022013.GB29523@lucon.org> References: <22765.12.7.175.2.1185413008.squirrel@webmail.sonic.net> <20070726022013.GB29523@lucon.org> Date: Fri, 27 Jul 2007 01:57:00 -0000 Subject: Re: [patch] elf32-i386.c, check for 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: multipart/mixed;boundary="----=_20070726184201_19135" 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/msg00482.txt.bz2 ------=_20070726184201_19135 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 103 > > I prefer BFD_ASSERT (h != NULL) and R_386_GNU_VTINHERIT has the same > issue. OK -- how's this? ------=_20070726184201_19135 Content-Type: text/plain; name="h2.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="h2.txt" Content-length: 1631 2007-07-25 Michael Snyder * elf32-i386.c (elf_i386_check_relocs): Check for null pointer. Index: elf32-i386.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-i386.c,v retrieving revision 1.174 diff -p -r1.174 elf32-i386.c *** elf32-i386.c 3 Jul 2007 14:26:41 -0000 1.174 --- elf32-i386.c 27 Jul 2007 01:40:47 -0000 *************** elf_i386_check_relocs (bfd *abfd, *** 1270,1284 **** /* This relocation describes the C++ object vtable hierarchy. Reconstruct it for later use during GC. */ case R_386_GNU_VTINHERIT: ! if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) ! return FALSE; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_386_GNU_VTENTRY: ! if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) ! return FALSE; break; default: --- 1270,1288 ---- /* This relocation describes the C++ object vtable hierarchy. Reconstruct it for later use during GC. */ case R_386_GNU_VTINHERIT: ! BFD_ASSERT (h != NULL); ! if (h != NULL) ! if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) ! return FALSE; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_386_GNU_VTENTRY: ! BFD_ASSERT (h != NULL); ! if (h != NULL) ! if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) ! return FALSE; break; default: ------=_20070726184201_19135--