[PATCH] D77554: [DWARFDebugLine] Check for (EOF) errors when parsing v5 content descriptors

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 07:01:41 PDT 2020


labath added inline comments.


================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/debug_line_short_prologue.s:1
+# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj -o %t
+# RUN: llvm-dwarfdump -debug-line %t 2>&1 | FileCheck %s
----------------
jhenderson wrote:
> This is probably fine as is, but did you consider extending debug_line_invalid.s (and its corresponding input file) or the gtest unit tests to test this?
debug_line_invalid.s won't cut it because this needs to be at the end of the section (at least until the truncation patch lands -- after that I was planning on deleting it as it will be equivalent to one of the tests there -- however, given the new test cases I've added now, it can probably stay).

The dwarf generator in the unittests would suffer from a similar problem -- I could get it to emit a shorter prologue length (though I would have to manually compute what that length would be), but it would still try to emit the prologue in entirety.


================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/debug_line_short_prologue.s:36
+.byte   5               # DW_LNCT_MD5
+.Lshort_prologue_header_end1:
+.Lshort_prologue_end1:
----------------
jhenderson wrote:
> Could you add a comment please, saying why this entry is considered too short?
I've done something (maybe?) even better. One of the new cases I've added shows how the prologue would look like if it was complete.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77554/new/

https://reviews.llvm.org/D77554





More information about the llvm-commits mailing list