This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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: dwarflint aborts after "invalid" attribute?


18.10.2010 18:40, Roland McGrath wrote:
>> Thanks.  Hmm, 280MB is too big for a test case.  Does it fail on
>> anything of a more reasonable size, that I could add to the test suite?
>
> Regardless, you can try out that file and verify whether dwarflint is
> bailing out early after citing just that one problem or if it just happens
> to be the only complaint there was to give.

Hm, I failed to notice that the file was linked in the bug report.  The 
low-level checks report nothing serious, the debug file is OK.

It takes somewhat large amount of memory, I should look into that, 
either there's something leaky, or simply inefficient.

The small library that I can use like test case is libdl.  For some 
reason I thought the problem was on RHEL, and grep for DW_AT_GNU_vector 
there turned up nothing, which is why I asked Josh if he has a smaller 
file handy.

> The behavior of dwarflint should be to keep going whenever it can,
> so you report more failures than just one.  In this sort of case,
> it's thoroughly possible to cite that error and then just carry on
> with everything else.  An unknown attribute just means that you can't
> validate any expectations about forms for that attribute or what DIE
> it appears in, etc.  You can still do everything else you would do
> if that attribute weren't there, and you should.

dwarflint checking granularity is now about the size of debug section. 
So I can painlessly make dwarflint tolerate buggy attribute, finish 
checking .debug_abbrev, and bail out then.  In fact that's now on the 
branch.

To do things like checking each CU the abbrev table of which I was able 
to read, I'd need to make some changes.  In fact dwarflint should check 
even CUs that it has at least partial information about.  It could bail 
out as soon as it hits invalid abbrev, or abbrev with unknown attribute. 
  Even then it might give up its goal of validating sibling references, 
and use them blindly to skip unknown portions.  That's now a TODO bullet 
point.

PM

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