This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: strings 2.10.90 coredumps when input is from /dev/fd/*
- To: Robin Houston <robin at kitsite dot com>
- Subject: Re: strings 2.10.90 coredumps when input is from /dev/fd/*
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Tue, 27 Feb 2001 08:46:11 -0800
- Cc: binutils at sourceware dot cygnus dot com, nickc at redhat dot com
- References: <20010227162321.A17954@puffinry.freeserve.co.uk>
On Tue, Feb 27, 2001 at 04:23:21PM +0000, Robin Houston wrote:
> bash$ strings <(ls)
> Segmentation fault (core dumped)
>
>
> The problem will also manifest itself reading from
> a named pipe:
>
> bash$ mkfifo /tmp/fifo
> bash$ cat </etc/passwd >/tmp/fifo&
> [1] 8238
> bash$ strings /tmp/fifo
> [1]+ Done cat </etc/passwd >/tmp/fifo
> Segmentation fault (core dumped)
>
>
> The problem exists in v2.9.1 also.
>
> .robin.
Thanks for your bug report. Here is a patch. Nick, can I apply it?
--
H.J. Lu (hjl@valinux.com)
----
2001-02-27 H.J. Lu <hjl@gnu.org>
* aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
abfd->tdata.aout_data == NULL.
Index: aoutx.h
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/aoutx.h,v
retrieving revision 1.10
diff -u -p -r1.10 aoutx.h
--- aoutx.h 2001/01/24 04:33:25 1.10
+++ aoutx.h 2001/02/27 16:39:14
@@ -2906,7 +2906,8 @@ NAME(aout,bfd_free_cached_info) (abfd)
{
asection *o;
- if (bfd_get_format (abfd) != bfd_object)
+ if (bfd_get_format (abfd) != bfd_object
+ || abfd->tdata.aout_data == NULL)
return true;
#define BFCI_FREE(x) if (x != NULL) { free (x); x = NULL; }