public inbox for bfd@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@cygnus.com>
To: hjl@lucon.org
Cc: chris@beezer.med.miami.edu, bfd@cygnus.com
Subject: Re: A patch for elf.c
Date: Tue, 08 Dec 1998 11:26:00 -0000	[thread overview]
Message-ID: <199812081926.OAA17039@subrogation.cygnus.com> (raw)
In-Reply-To: <m0znRNv-00038dC@ocean.lucon.org>

   From: hjl@lucon.org (H.J. Lu)
   Date: Tue, 8 Dec 1998 09:57:19 -0800 (PST)

   > On Mon, 7 Dec 1998, H.J. Lu wrote:
   > 
   > > Could you please tell me on which platform you had this problem?
   > 
   > Alpha running Debian Linux.

   Thanks for this information. BTW, have you mentioned this in your first
   bug report? I think this patch fixes the bug. 

   Ian, this bug happens on ELF/Alpha when you strip more than one shared
   libraries at a time. It is not the first bfd_zalloc/bfd_alloc bug in
   bfd. It is quite annoying.

This bug was reported on bug-gnu-utils.  I believe I have already
fixed this problem with the appended patch.

We've disagreed before on whether memory should be cleared when it is
allocated, and I think we will continue to disagree.  This was a bug
introduced with a change to the function a few months ago.  The fix is
to avoid introducing bugs; clearing memory is just treating the
symptom.

Ian

Index: elf.c
===================================================================
RCS file: /cvs/cvsfiles/devo/bfd/elf.c,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -r1.222 -r1.223
--- elf.c	1998/11/18 04:26:38	1.222
+++ elf.c	1998/12/07 00:33:14	1.223
@@ -3444,6 +3444,8 @@
       m->includes_filehdr = (p->p_offset == 0
 			     && p->p_filesz >= iehdr->e_ehsize);
 
+      m->includes_phdrs = 0;
+
       if (! phdr_included || p->p_type != PT_LOAD)
 	{
 	  m->includes_phdrs =

  parent reply	other threads:[~1998-12-08 11:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.3.96.981208082500.26204A-100000@beezer.med.miami.edu>
1998-12-08  9:57 ` H.J. Lu
1998-12-08 10:28   ` Christopher C Chimelis
1998-12-08 11:26   ` Ian Lance Taylor [this message]
1998-12-08 11:34     ` Christopher C Chimelis
1998-12-09  7:42     ` H.J. Lu
1998-12-09  8:04       ` Roland McGrath
1998-12-09  9:35       ` Ian Lance Taylor
1998-12-09 10:03         ` Jeffrey A Law
1998-12-09 16:27         ` Stan Shebs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199812081926.OAA17039@subrogation.cygnus.com \
    --to=ian@cygnus.com \
    --cc=bfd@cygnus.com \
    --cc=chris@beezer.med.miami.edu \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).