[PATCH] D64622: [DWARF] Fix the reserved values for unit length in DWARFDebugLine.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 00:00:54 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL366190: [DWARF] Fix the reserved values for unit length in DWARFDebugLine. (authored by ikudrin, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D64622?vs=209433&id=210029#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64622/new/
https://reviews.llvm.org/D64622
Files:
llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
Index: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
===================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -304,7 +304,7 @@
if (TotalLength == UINT32_MAX) {
FormParams.Format = dwarf::DWARF64;
TotalLength = DebugLineData.getU64(OffsetPtr);
- } else if (TotalLength >= 0xffffff00) {
+ } else if (TotalLength >= 0xfffffff0) {
return createStringError(errc::invalid_argument,
"parsing line table prologue at offset 0x%8.8" PRIx64
" unsupported reserved unit length found of value 0x%8.8" PRIx64,
@@ -1091,7 +1091,7 @@
}
bool DWARFDebugLine::Prologue::totalLengthIsValid() const {
- return TotalLength == 0xffffffff || TotalLength < 0xffffff00;
+ return TotalLength == 0xffffffff || TotalLength < 0xfffffff0;
}
DWARFDebugLine::LineTable DWARFDebugLine::SectionParser::parseNext(
Index: llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
===================================================================
--- llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+++ llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
@@ -291,13 +291,13 @@
return;
LineTable < = Gen->addLineTable();
- LT.setCustomPrologue({{0xffffff00, LineTable::Long}});
+ LT.setCustomPrologue({{0xfffffff0, LineTable::Long}});
generate();
checkGetOrParseLineTableEmitsError(
"parsing line table prologue at offset 0x00000000 unsupported reserved "
- "unit length found of value 0xffffff00");
+ "unit length found of value 0xfffffff0");
}
TEST_F(DebugLineBasicFixture, ErrorForLowVersion) {
@@ -532,7 +532,7 @@
return;
LineTable < = Gen->addLineTable();
- LT.setCustomPrologue({{0xffffff00, LineTable::Long}});
+ LT.setCustomPrologue({{0xfffffff0, LineTable::Long}});
Gen->addLineTable();
generate();
@@ -544,7 +544,7 @@
EXPECT_FALSE(Recoverable);
checkError("parsing line table prologue at offset 0x00000000 unsupported "
- "reserved unit length found of value 0xffffff00",
+ "reserved unit length found of value 0xfffffff0",
std::move(Unrecoverable));
}
@@ -553,7 +553,7 @@
return;
LineTable < = Gen->addLineTable();
- LT.setCustomPrologue({{0xffffff00, LineTable::Long}});
+ LT.setCustomPrologue({{0xfffffff0, LineTable::Long}});
Gen->addLineTable();
generate();
@@ -564,7 +564,7 @@
EXPECT_TRUE(Parser.done());
checkError("parsing line table prologue at offset 0x00000000 unsupported "
- "reserved unit length found of value 0xffffff00",
+ "reserved unit length found of value 0xfffffff0",
std::move(Unrecoverable));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64622.210029.patch
Type: text/x-patch
Size: 2775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190716/f66c01ee/attachment-0001.bin>
More information about the llvm-commits
mailing list