[PATCH] fix segfault on copying some PEs
Jeff Muizelaar
muizelaar@rogers.com
Mon Aug 4 16:06:00 GMT 2003
> On Sun, Aug 03, 2003 at 03:53:39PM -0400, Jeff Muizelaar wrote:
> > It seems some PEs have ptr's to line number tables that don't
> > exist.
>
> That is true. It's annoying.
>
> > Currently we blindly assume that they are valid invalid ones cause
> > a segfault. The attached patch prints a warning and skips the
> > missing table.
>
> This seems ok to me but I'd be comfortable with just returning
> without a warning. We silently ignore this type of thing in gdb.
I am flexible, but as far as the PE spec is concerned the file is
broken. Plus, the we don't really know the reason the read failed, if it
was for some other reason it is good to have the warning.
>
> I wonder if this should be conditionalized for Windows, too. I
> assume that regular COFF targets don't do this.
There isn't much point. It would only make things messier and in the off
chance that the coff target is broken or the read fails for any other
reason, we won't segfault.
-Jeff
More information about the Binutils
mailing list