diff options
author | Igor Kudrin <ikudrin@accesssoftek.com> | 2019-07-16 07:01:08 +0000 |
---|---|---|
committer | Igor Kudrin <ikudrin@accesssoftek.com> | 2019-07-16 07:01:08 +0000 |
commit | f48bc0181232be2499afe84f478bcda5699931af (patch) | |
tree | a4304429e8864b03c2704b9bf19c2c745c9a492b /llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | |
parent | 74c350af2181cf21085f69bd2d9bcf4d6d2dc03c (diff) | |
download | bcm5719-llvm-f48bc0181232be2499afe84f478bcda5699931af.tar.gz bcm5719-llvm-f48bc0181232be2499afe84f478bcda5699931af.zip |
[DWARF] Fix the reserved values for unit length in DWARFDebugLine.
The DWARF3 documentation had inconsistency concerning the reserved range
for unit length values. The issue was fixed in DWARF4.
Differential Revision: https://reviews.llvm.org/D64622
llvm-svn: 366190
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp index 77b4688c234..3ee5652a0eb 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -304,7 +304,7 @@ Error DWARFDebugLine::Prologue::parse(const DWARFDataExtractor &DebugLineData, 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 @@ DWARFDebugLine::SectionParser::SectionParser(DWARFDataExtractor &Data, } bool DWARFDebugLine::Prologue::totalLengthIsValid() const { - return TotalLength == 0xffffffff || TotalLength < 0xffffff00; + return TotalLength == 0xffffffff || TotalLength < 0xfffffff0; } DWARFDebugLine::LineTable DWARFDebugLine::SectionParser::parseNext( |