This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix segfault on copying some PEs


 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]