[PATCH] D43470: [DWARF] Prevent crash when .debug_line line_range is zero
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 19 09:31:55 PST 2018
jhenderson added inline comments.
================
Comment at: lib/DebugInfo/DWARF/DWARFDebugLine.cpp:290
FileNames)) {
fprintf(stderr,
"warning: parsing line table prologue at 0x%8.8" PRIx64
----------------
And presumably this one too @aprantl?
================
Comment at: lib/DebugInfo/DWARF/DWARFDebugLine.cpp:309
+
+ if (LineRange == 0) {
+ fprintf(stderr, "warning: parsing line table prologue at 0x%8.8" PRIx64
----------------
aprantl wrote:
> aprantl wrote:
> > aprantl wrote:
> > > Can you also make it so that llvm-dwarfdump --verify reports this as an error?
> > Nevermind. That's what you did!
> Can you use DWARFVerifier::warn() here?
>
I'll take a look for this and the other usages here.
llvm-dwarfdump --verify reports an error automatically if false is returned here, so that's how we get an error, as demonstrated in the test.
Repository:
rL LLVM
https://reviews.llvm.org/D43470
More information about the llvm-commits
mailing list