This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Add use of truncating data extractor to debug line parsing
ClosedPublic

Authored by jhenderson on May 29 2020, 6:32 AM.

Details

Summary

This will ensure that nothing can ever start parsing data from a future sequence and part-read data will be returned as 0 instead.

Depends on D80795.

Diff Detail

Event Timeline

jhenderson created this revision.May 29 2020, 6:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2020, 6:32 AM
jhenderson added a subscriber: labath.
aprantl accepted this revision.May 29 2020, 11:42 AM
This revision is now accepted and ready to land.May 29 2020, 11:42 AM
labath accepted this revision.Jun 1 2020, 12:57 AM

Looks good too. (and reminds me I should really get back to finishing my patch for parsing the prologue).

llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
251

Ideally, I think we should not print this opcode, as we weren't able to read all of it, but I think this is an improvement nonetheless.

jhenderson marked an inline comment as done.Jun 1 2020, 2:09 AM
jhenderson added inline comments.
llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
251

Yep, I have a follow-up in the works already to do exactly that (and similar things for standard opcodes at some point).

Looks good too. (and reminds me I should really get back to finishing my patch for parsing the prologue).

By the way, could you refresh me on what that patch will be doing? I've got a few more patches in related areas I want to work on, but I don't want to tread on your toes, if you are already part way through doing one or more of these changes!

This revision was automatically updated to reflect the committed changes.
labath added a comment.Jun 1 2020, 6:42 AM

Looks good too. (and reminds me I should really get back to finishing my patch for parsing the prologue).

By the way, could you refresh me on what that patch will be doing? I've got a few more patches in related areas I want to work on, but I don't want to tread on your toes, if you are already part way through doing one or more of these changes!

It's D77557 -- it does something similar to this patch, but handles the line table prologue. The patch had a bunch of dependencies, and was never my top priority so it got buried on my stack.. I have a bit of time now, so let me see what it takes to revive it...