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)); }