[PATCH] D76498: [DWARF] Fix v5 debug_line parsing of prologues with many files

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 01:38:31 PDT 2020


jhenderson added a comment.

In D76498#1933793 <https://reviews.llvm.org/D76498#1933793>, @probinson wrote:

> I suppose this should lead to questions about whether mis-encoded ULEBs can cause parsing sadness, and are those handled in a reasonable way?


If I'm not mistaken, the only way a ULEB could be misencoded can be detected is by it running off the end of the data (although in practice a value greater than max uint64_t will also be detected IIRC). I have a vague memory that the data extractor records an error, if using the appropriate style of parsing, but I don't think we are currently using that type in some cases, so the error is ignored.



================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/debug_line_many_files.s:1
+# RUN: llvm-mc -triple x86_64-pc-linux -filetype=obj %s -o %t
+# RUN: llvm-dwarfdump -debug-line %t | FileCheck %s
----------------
Perhaps worth a brief comment saying why many files is interesting?

Also, perhaps worth renaming this test to indicate it's specific to version 5? At least, this should be in the comment.


================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/debug_line_many_files.s:65
+.Lunit_end0:
+
----------------
Nit: too many blank lines at EOF.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76498





More information about the llvm-commits mailing list