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 20:48, Josh Stone wrote:
> On 10/18/2010 11:03 AM, Petr Machata wrote:
>> 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.
>
> Do you really need to bail out?  It seems like dwarflint could still do
> the rest of its checks, perhaps with the user understanding that an
> invalid-attribute error early on may taint the rest of the reported
> errors.  (Much like any compiler error tends to cast subsequent errors
> into doubt...)

Well, many low-level checks can be performed as long as we know the 
form.  Most of .debug_info can be checked even if that's broken, we just 
need to rely on DW_AT_siblings being accurate (normally it's the other 
way around, dwarflint checks that sibling attributes point at what they 
are supposed to).

In general, you cannot run high-level checks unless the low-level ones 
pass.  That's because high-level checks use libdw, and that makes all 
kinds of assumptions about the quality of incoming data.  But reported 
errors != doesn't pass.  Checks typically produce a lot of messages 
without really failing.  Initially I assumed that invalid attribute is 
one of these no-go errors, but now I realize that's not so.

So the answer seems to be no, I don't need to bail out in this case.  I 
adjusted the code to be tolerant about unknown attributes.

Thanks,
PM

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