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


[Note Reply-To SET]
On Mon, Aug 04, 2003 at 12:06:18PM -0400, Jeff Muizelaar wrote:
>> 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 guess it depends on the file.  Some of the Windows system DLLs seem to
exhibit this broken behavior so we don't really care about those.  If these
are files created by binutils/ld, then we should care.  However, I guess
the failure will be rare enough that we won't be flooded with messages.

>>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.

Ok.  I'll defer to Nick on this one, then.  I don't have the authority to
say yes to this patch since it is outside of windows-specific code.

cgf


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