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?


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

For example, I just took that "bad label PC" test with the vector
addition, and manually edited the DW_AT_GNU_vector into a truly invalid
attribute 0x3fff (attached).  This gives:

$ eu-readelf --debug-dump=info bad_label_and_attr | tail -n20
...
 [    a2]    array_type
             unknown user attribute 3fff (flag) Yes
             type                 (ref4) [    9b]
             sibling              (ref4) [    b3]
...

$ dwarflint bad_label_and_attr
error: .debug_abbrev: abbr. attribute 0x74: invalid or unknown name 0x3fff.
(bails, so it doesn't report the bad label PC range...)


Josh

Attachment: bad_label_and_attr.bz2
Description: application/bzip


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