summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2019-07-16 07:01:08 +0000
committerIgor Kudrin <ikudrin@accesssoftek.com>2019-07-16 07:01:08 +0000
commitf48bc0181232be2499afe84f478bcda5699931af (patch)
treea4304429e8864b03c2704b9bf19c2c745c9a492b /llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
parent74c350af2181cf21085f69bd2d9bcf4d6d2dc03c (diff)
downloadbcm5719-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.cpp4
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(
OpenPOWER on IntegriCloud