Index: include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h =================================================================== --- include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h +++ include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h @@ -245,7 +245,7 @@ struct Header : public HeaderPOD { SmallString<8> AugmentationString; - Error extract(const DWARFDataExtractor &AS, uint64_t *Offset); + void extract(const DWARFDataExtractor &AS, DataExtractor::Cursor &C); void dump(ScopedPrinter &W) const; }; @@ -406,12 +406,12 @@ Optional Hash) const; void dumpBucket(ScopedPrinter &W, uint32_t Bucket) const; - Expected extractAttributeEncoding(uint64_t *Offset); + AttributeEncoding extractAttributeEncoding(DataExtractor::Cursor &C); - Expected> - extractAttributeEncodings(uint64_t *Offset); + std::vector + extractAttributeEncodings(DataExtractor::Cursor &C); - Expected extractAbbrev(uint64_t *Offset); + Abbrev extractAbbrev(DataExtractor::Cursor &C); public: NameIndex(const DWARFDebugNames &Section, uint64_t Base) Index: include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h =================================================================== --- include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h +++ include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h @@ -68,8 +68,8 @@ /// Return the location list at the given offset or nullptr. LocationList const *getLocationListAtOffset(uint64_t Offset) const; - Optional parseOneLocationList(DWARFDataExtractor Data, - uint64_t *Offset); + static Expected + parseOneLocationList(const DWARFDataExtractor &Data, uint64_t *Offset); }; class DWARFDebugLoclists { @@ -106,8 +106,9 @@ /// Return the location list at the given offset or nullptr. LocationList const *getLocationListAtOffset(uint64_t Offset) const; - static Optional - parseOneLocationList(DataExtractor Data, uint64_t *Offset, unsigned Version); + static Expected parseOneLocationList(const DataExtractor &Data, + uint64_t *Offset, + unsigned Version); }; } // end namespace llvm Index: lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp +++ lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp @@ -42,19 +42,26 @@ DWARFAcceleratorTable::~DWARFAcceleratorTable() = default; Error AppleAcceleratorTable::extract() { - uint64_t Offset = 0; + DataExtractor::Cursor C(0); - // Check that we can at least read the header. - if (!AccelSection.isValidOffset(offsetof(Header, HeaderDataLength) + 4)) - return createStringError(errc::illegal_byte_sequence, - "Section too small: cannot read header."); + Hdr.Magic = AccelSection.getU32(C); + Hdr.Version = AccelSection.getU16(C); + Hdr.HashFunction = AccelSection.getU16(C); + Hdr.BucketCount = AccelSection.getU32(C); + Hdr.HashCount = AccelSection.getU32(C); + Hdr.HeaderDataLength = AccelSection.getU32(C); - Hdr.Magic = AccelSection.getU32(&Offset); - Hdr.Version = AccelSection.getU16(&Offset); - Hdr.HashFunction = AccelSection.getU16(&Offset); - Hdr.BucketCount = AccelSection.getU32(&Offset); - Hdr.HashCount = AccelSection.getU32(&Offset); - Hdr.HeaderDataLength = AccelSection.getU32(&Offset); + HdrData.DIEOffsetBase = AccelSection.getU32(C); + uint32_t NumAtoms = AccelSection.getU32(C); + + for (unsigned i = 0; i < NumAtoms; ++i) { + uint16_t AtomType = AccelSection.getU16(C); + auto AtomForm = static_cast(AccelSection.getU16(C)); + HdrData.Atoms.push_back(std::make_pair(AtomType, AtomForm)); + } + + if (Error E = C.takeError()) + return E; // Check that we can read all the hashes and offsets from the // section (see SourceLevelDebugging.rst for the structure of the index). @@ -66,15 +73,6 @@ errc::illegal_byte_sequence, "Section too small: cannot read buckets and hashes."); - HdrData.DIEOffsetBase = AccelSection.getU32(&Offset); - uint32_t NumAtoms = AccelSection.getU32(&Offset); - - for (unsigned i = 0; i < NumAtoms; ++i) { - uint16_t AtomType = AccelSection.getU16(&Offset); - auto AtomForm = static_cast(AccelSection.getU16(&Offset)); - HdrData.Atoms.push_back(std::make_pair(AtomType, AtomForm)); - } - IsValid = true; return Error::success(); } @@ -376,32 +374,20 @@ W.startLine() << "Augmentation: '" << AugmentationString << "'\n"; } -Error DWARFDebugNames::Header::extract(const DWARFDataExtractor &AS, - uint64_t *Offset) { - // Check that we can read the fixed-size part. - if (!AS.isValidOffset(*Offset + sizeof(HeaderPOD) - 1)) - return createStringError(errc::illegal_byte_sequence, - "Section too small: cannot read header."); - - UnitLength = AS.getU32(Offset); - Version = AS.getU16(Offset); - Padding = AS.getU16(Offset); - CompUnitCount = AS.getU32(Offset); - LocalTypeUnitCount = AS.getU32(Offset); - ForeignTypeUnitCount = AS.getU32(Offset); - BucketCount = AS.getU32(Offset); - NameCount = AS.getU32(Offset); - AbbrevTableSize = AS.getU32(Offset); - AugmentationStringSize = alignTo(AS.getU32(Offset), 4); - - if (!AS.isValidOffsetForDataOfSize(*Offset, AugmentationStringSize)) - return createStringError( - errc::illegal_byte_sequence, - "Section too small: cannot read header augmentation."); - AugmentationString.resize(AugmentationStringSize); - AS.getU8(Offset, reinterpret_cast(AugmentationString.data()), - AugmentationStringSize); - return Error::success(); +void DWARFDebugNames::Header::extract(const DWARFDataExtractor &AS, + DataExtractor::Cursor &C) { + UnitLength = AS.getU32(C); + Version = AS.getU16(C); + Padding = AS.getU16(C); + CompUnitCount = AS.getU32(C); + LocalTypeUnitCount = AS.getU32(C); + ForeignTypeUnitCount = AS.getU32(C); + BucketCount = AS.getU32(C); + NameCount = AS.getU32(C); + AbbrevTableSize = AS.getU32(C); + + AugmentationStringSize = alignTo(AS.getU32(C), 4); + AS.getU8(C, AugmentationString, AugmentationStringSize); } void DWARFDebugNames::Abbrev::dump(ScopedPrinter &W) const { @@ -436,87 +422,80 @@ return DWARFDebugNames::Abbrev(~0, dwarf::Tag(0), {}); } -Expected -DWARFDebugNames::NameIndex::extractAttributeEncoding(uint64_t *Offset) { - if (*Offset >= EntriesBase) { - return createStringError(errc::illegal_byte_sequence, - "Incorrectly terminated abbreviation table."); - } - - uint32_t Index = Section.AccelSection.getULEB128(Offset); - uint32_t Form = Section.AccelSection.getULEB128(Offset); +DWARFDebugNames::AttributeEncoding +DWARFDebugNames::NameIndex::extractAttributeEncoding(DataExtractor::Cursor &C) { + uint32_t Index = Section.AccelSection.getULEB128(C); + uint32_t Form = Section.AccelSection.getULEB128(C); return AttributeEncoding(dwarf::Index(Index), dwarf::Form(Form)); } -Expected> -DWARFDebugNames::NameIndex::extractAttributeEncodings(uint64_t *Offset) { +std::vector +DWARFDebugNames::NameIndex::extractAttributeEncodings( + DataExtractor::Cursor &C) { std::vector Result; for (;;) { - auto AttrEncOr = extractAttributeEncoding(Offset); - if (!AttrEncOr) - return AttrEncOr.takeError(); - if (isSentinel(*AttrEncOr)) - return std::move(Result); + AttributeEncoding AttrEnc = extractAttributeEncoding(C); + if (isSentinel(AttrEnc)) + return Result; - Result.emplace_back(*AttrEncOr); + Result.emplace_back(AttrEnc); } } -Expected -DWARFDebugNames::NameIndex::extractAbbrev(uint64_t *Offset) { - if (*Offset >= EntriesBase) { - return createStringError(errc::illegal_byte_sequence, - "Incorrectly terminated abbreviation table."); - } - - uint32_t Code = Section.AccelSection.getULEB128(Offset); +DWARFDebugNames::Abbrev +DWARFDebugNames::NameIndex::extractAbbrev(DataExtractor::Cursor &C) { + uint32_t Code = Section.AccelSection.getULEB128(C); if (Code == 0) return sentinelAbbrev(); - uint32_t Tag = Section.AccelSection.getULEB128(Offset); - auto AttrEncOr = extractAttributeEncodings(Offset); - if (!AttrEncOr) - return AttrEncOr.takeError(); - return Abbrev(Code, dwarf::Tag(Tag), std::move(*AttrEncOr)); + uint32_t Tag = Section.AccelSection.getULEB128(C); + std::vector AttrEnc = extractAttributeEncodings(C); + return Abbrev(Code, dwarf::Tag(Tag), std::move(AttrEnc)); } Error DWARFDebugNames::NameIndex::extract() { const DWARFDataExtractor &AS = Section.AccelSection; - uint64_t Offset = Base; - if (Error E = Hdr.extract(AS, &Offset)) - return E; - - CUsBase = Offset; - Offset += Hdr.CompUnitCount * 4; - Offset += Hdr.LocalTypeUnitCount * 4; - Offset += Hdr.ForeignTypeUnitCount * 8; - BucketsBase = Offset; - Offset += Hdr.BucketCount * 4; - HashesBase = Offset; + DataExtractor::Cursor C(Base); + Hdr.extract(AS, C); + + CUsBase = C.tell(); + AS.skip(C, Hdr.CompUnitCount * 4); + AS.skip(C, Hdr.LocalTypeUnitCount * 4); + AS.skip(C, Hdr.ForeignTypeUnitCount * 8); + BucketsBase = C.tell(); + AS.skip(C, Hdr.BucketCount * 4); + HashesBase = C.tell(); if (Hdr.BucketCount > 0) - Offset += Hdr.NameCount * 4; - StringOffsetsBase = Offset; - Offset += Hdr.NameCount * 4; - EntryOffsetsBase = Offset; - Offset += Hdr.NameCount * 4; + AS.skip(C, Hdr.NameCount * 4); + StringOffsetsBase = C.tell(); + AS.skip(C, Hdr.NameCount * 4); + EntryOffsetsBase = C.tell(); + AS.skip(C, Hdr.NameCount * 4); - if (!AS.isValidOffsetForDataOfSize(Offset, Hdr.AbbrevTableSize)) + if (llvm::Error E = C.takeError()) + return E; + uint64_t AbbrevBase = C.tell(); + if (!AS.isValidOffsetForDataOfSize(AbbrevBase, Hdr.AbbrevTableSize)) return createStringError(errc::illegal_byte_sequence, "Section too small: cannot read abbreviations."); - EntriesBase = Offset + Hdr.AbbrevTableSize; + EntriesBase = C.tell() + Hdr.AbbrevTableSize; for (;;) { - auto AbbrevOr = extractAbbrev(&Offset); - if (!AbbrevOr) - return AbbrevOr.takeError(); - if (isSentinel(*AbbrevOr)) - return Error::success(); + Abbrev Abbr = extractAbbrev(C); + if (llvm::Error E = C.takeError()) + return E; + if (isSentinel(Abbr)) + break; - if (!Abbrevs.insert(std::move(*AbbrevOr)).second) + if (!Abbrevs.insert(std::move(Abbr)).second) return createStringError(errc::invalid_argument, "Duplicate abbreviation code."); } + if (C.tell() > EntriesBase) + return createStringError(errc::illegal_byte_sequence, + "Incorrectly terminated abbreviation table."); + return Error::success(); } DWARFDebugNames::Entry::Entry(const NameIndex &NameIdx, const Abbrev &Abbr) Index: lib/DebugInfo/DWARF/DWARFDebugLoc.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFDebugLoc.cpp +++ lib/DebugInfo/DWARF/DWARFDebugLoc.cpp @@ -83,47 +83,37 @@ } } -Optional -DWARFDebugLoc::parseOneLocationList(DWARFDataExtractor Data, uint64_t *Offset) { +Expected +DWARFDebugLoc::parseOneLocationList(const DWARFDataExtractor &Data, + uint64_t *Offset) { LocationList LL; LL.Offset = *Offset; + DataExtractor::Cursor C(*Offset); // 2.6.2 Location Lists // A location list entry consists of: while (true) { Entry E; - if (!Data.isValidOffsetForDataOfSize(*Offset, 2 * Data.getAddressSize())) { - WithColor::error() << "location list overflows the debug_loc section.\n"; - return None; - } // 1. A beginning address offset. ... - E.Begin = Data.getRelocatedAddress(Offset); + E.Begin = Data.getRelocatedAddress(C); // 2. An ending address offset. ... - E.End = Data.getRelocatedAddress(Offset); + E.End = Data.getRelocatedAddress(C); + if (Error Err = C.takeError()) + return std::move(Err); // The end of any given location list is marked by an end of list entry, // which consists of a 0 for the beginning address offset and a 0 for the // ending address offset. - if (E.Begin == 0 && E.End == 0) + if (E.Begin == 0 && E.End == 0) { + *Offset = C.tell(); return LL; - - if (!Data.isValidOffsetForDataOfSize(*Offset, 2)) { - WithColor::error() << "location list overflows the debug_loc section.\n"; - return None; } - unsigned Bytes = Data.getU16(Offset); - if (!Data.isValidOffsetForDataOfSize(*Offset, Bytes)) { - WithColor::error() << "location list overflows the debug_loc section.\n"; - return None; - } + unsigned Bytes = Data.getU16(C); // A single location description describing the location of the object... - StringRef str = Data.getData().substr(*Offset, Bytes); - *Offset += Bytes; - E.Loc.reserve(str.size()); - llvm::copy(str, std::back_inserter(E.Loc)); + Data.getU8(C, E.Loc, Bytes); LL.Entries.push_back(std::move(E)); } } @@ -133,67 +123,65 @@ AddressSize = data.getAddressSize(); uint64_t Offset = 0; - while (data.isValidOffset(Offset + data.getAddressSize() - 1)) { + while (Offset < data.getData().size()) { if (auto LL = parseOneLocationList(data, &Offset)) Locations.push_back(std::move(*LL)); - else + else { + logAllUnhandledErrors(LL.takeError(), WithColor::error()); break; + } } - if (data.isValidOffset(Offset)) - WithColor::error() << "failed to consume entire .debug_loc section\n"; } -Optional -DWARFDebugLoclists::parseOneLocationList(DataExtractor Data, uint64_t *Offset, - unsigned Version) { +Expected +DWARFDebugLoclists::parseOneLocationList(const DataExtractor &Data, + uint64_t *Offset, unsigned Version) { LocationList LL; LL.Offset = *Offset; + DataExtractor::Cursor C(*Offset); // dwarf::DW_LLE_end_of_list_entry is 0 and indicates the end of the list. - while (auto Kind = - static_cast(Data.getU8(Offset))) { - + while (auto Kind = static_cast(Data.getU8(C))) { Entry E; E.Kind = Kind; switch (Kind) { case dwarf::DW_LLE_startx_length: - E.Value0 = Data.getULEB128(Offset); + E.Value0 = Data.getULEB128(C); // Pre-DWARF 5 has different interpretation of the length field. We have // to support both pre- and standartized styles for the compatibility. if (Version < 5) - E.Value1 = Data.getU32(Offset); + E.Value1 = Data.getU32(C); else - E.Value1 = Data.getULEB128(Offset); + E.Value1 = Data.getULEB128(C); break; case dwarf::DW_LLE_start_length: - E.Value0 = Data.getAddress(Offset); - E.Value1 = Data.getULEB128(Offset); + E.Value0 = Data.getAddress(C); + E.Value1 = Data.getULEB128(C); break; case dwarf::DW_LLE_offset_pair: - E.Value0 = Data.getULEB128(Offset); - E.Value1 = Data.getULEB128(Offset); + E.Value0 = Data.getULEB128(C); + E.Value1 = Data.getULEB128(C); break; case dwarf::DW_LLE_base_address: - E.Value0 = Data.getAddress(Offset); + E.Value0 = Data.getAddress(C); break; default: - WithColor::error() << "dumping support for LLE of kind " << (int)Kind - << " not implemented\n"; - return None; + cantFail(C.takeError()); + return createStringError(errc::illegal_byte_sequence, + "LLE of kind %x not supported", (int)Kind); } if (Kind != dwarf::DW_LLE_base_address) { - unsigned Bytes = - Version >= 5 ? Data.getULEB128(Offset) : Data.getU16(Offset); + unsigned Bytes = Version >= 5 ? Data.getULEB128(C) : Data.getU16(C); // A single location description describing the location of the object... - StringRef str = Data.getData().substr(*Offset, Bytes); - *Offset += Bytes; - E.Loc.resize(str.size()); - llvm::copy(str, E.Loc.begin()); + Data.getU8(C, E.Loc, Bytes); } LL.Entries.push_back(std::move(E)); } + if (Error Err = C.takeError()) + return std::move(Err); + *Offset = C.tell(); return LL; } @@ -202,11 +190,13 @@ AddressSize = data.getAddressSize(); uint64_t Offset = 0; - while (data.isValidOffset(Offset)) { + while (Offset < data.getData().size()) { if (auto LL = parseOneLocationList(data, &Offset, Version)) Locations.push_back(std::move(*LL)); - else + else { + logAllUnhandledErrors(LL.takeError(), WithColor::error()); return; + } } } Index: test/DebugInfo/X86/dwarfdump-debug-loc-error-cases.s =================================================================== --- /dev/null +++ test/DebugInfo/X86/dwarfdump-debug-loc-error-cases.s @@ -0,0 +1,50 @@ +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE1=0 -o %t1.o +# RUN: llvm-dwarfdump -debug-loc %t1.o 2>&1 | FileCheck %s + +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE2=0 -o %t2.o +# RUN: llvm-dwarfdump -debug-loc %t2.o 2>&1 | FileCheck %s + +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE3=0 -o %t3.o +# RUN: llvm-dwarfdump -debug-loc %t3.o 2>&1 | FileCheck %s + +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE4=0 -o %t4.o +# RUN: llvm-dwarfdump -debug-loc %t4.o 2>&1 | FileCheck %s + +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE5=0 -o %t5.o +# RUN: llvm-dwarfdump -debug-loc %t5.o 2>&1 | FileCheck %s + +# CHECK: error: unexpected end of data + +.section .debug_loc,"",@progbits +.ifdef CASE1 + .byte 1 # bogus +.endif +.ifdef CASE2 + .long 0 # starting offset +.endif +.ifdef CASE3 + .long 0 # starting offset + .long 1 # ending offset +.endif +.ifdef CASE4 + .long 0 # starting offset + .long 1 # ending offset + .word 0 # Loc expr size +.endif +.ifdef CASE5 + .long 0 # starting offset + .long 1 # ending offset + .word 0 # Loc expr size + .long 0 # starting offset +.endif + +# A minimal compile unit is needed to deduce the address size of the location +# lists +.section .debug_info,"",@progbits + .long .Lcu_end0-.Lcu_begin0 # Length of Unit +.Lcu_begin0: + .short 4 # DWARF version number + .long 0 # Offset Into Abbrev. Section + .byte 8 # Address Size (in bytes) + .byte 0 # End Of Children Mark +.Lcu_end0: Index: test/DebugInfo/X86/dwarfdump-debug-loclists-error-cases.s =================================================================== --- /dev/null +++ test/DebugInfo/X86/dwarfdump-debug-loclists-error-cases.s @@ -0,0 +1,62 @@ +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE1=0 -o %t1.o +# RUN: llvm-dwarfdump -debug-loclists %t1.o 2>&1 | FileCheck %s --check-prefix=ULEB + +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE2=0 -o %t2.o +# RUN: llvm-dwarfdump -debug-loclists %t2.o 2>&1 | FileCheck %s --check-prefix=ULEB + +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE3=0 -o %t3.o +# RUN: llvm-dwarfdump -debug-loclists %t3.o 2>&1 | FileCheck %s --check-prefix=ULEB + +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE4=0 -o %t4.o +# RUN: llvm-dwarfdump -debug-loclists %t4.o 2>&1 | FileCheck %s + +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE5=0 -o %t5.o +# RUN: llvm-dwarfdump -debug-loclists %t5.o 2>&1 | FileCheck %s + +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux --defsym CASE6=0 -o %t6.o +# RUN: llvm-dwarfdump -debug-loclists %t6.o 2>&1 | FileCheck %s --check-prefix=UNIMPL + +# CHECK: error: unexpected end of data +# ULEB: error: malformed uleb128, extends past end +# UNIMPL: error: LLE of kind 47 not supported + +.section .debug_loclists,"",@progbits + .long .Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0 +.Ldebug_loclist_table_start0: + .short 5 # Version. + .byte 8 # Address size. + .byte 0 # Segment selector size. + .long 0 # Offset entry count. +.Lloclists_table_base0: +.Ldebug_loc0: +.ifdef CASE1 + .byte 4 # DW_LLE_offset_pair +.endif +.ifdef CASE2 + .byte 4 # DW_LLE_offset_pair + .uleb128 0x0 # starting offset +.endif +.ifdef CASE3 + .byte 4 # DW_LLE_offset_pair + .uleb128 0x0 # starting offset + .uleb128 0x10 # ending offset +.endif +.ifdef CASE4 + .byte 4 # DW_LLE_offset_pair + .uleb128 0x0 # starting offset + .uleb128 0x10 # ending offset + .byte 1 # Loc expr size +.endif +.ifdef CASE5 + .byte 4 # DW_LLE_offset_pair + .uleb128 0x0 # starting offset + .uleb128 0x10 # ending offset + .byte 1 # Loc expr size + .byte 117 # DW_OP_breg5 +.endif +.ifdef CASE6 + .byte 0x47 +.endif + +.Ldebug_loclist_table_end0: + Index: test/tools/llvm-dwarfdump/X86/debug-names-verify-abbrev-short.s =================================================================== --- test/tools/llvm-dwarfdump/X86/debug-names-verify-abbrev-short.s +++ test/tools/llvm-dwarfdump/X86/debug-names-verify-abbrev-short.s @@ -1,7 +1,7 @@ # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \ # RUN: not llvm-dwarfdump -verify - | FileCheck %s -# CHECK: Incorrectly terminated abbreviation table. +# CHECK: error: malformed uleb128, extends past end .section .debug_str,"MS",@progbits,1 .Lstring_producer: Index: test/tools/llvm-dwarfdump/X86/debug-names-verify-short1.s =================================================================== --- test/tools/llvm-dwarfdump/X86/debug-names-verify-short1.s +++ test/tools/llvm-dwarfdump/X86/debug-names-verify-short1.s @@ -1,7 +1,7 @@ # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \ # RUN: not llvm-dwarfdump -verify - | FileCheck %s -# CHECK: Section too small: cannot read header. +# CHECK: error: unexpected end of data .section .debug_str,"MS",@progbits,1 .Lstring_producer: Index: test/tools/llvm-dwarfdump/X86/debug-names-verify-short2.s =================================================================== --- test/tools/llvm-dwarfdump/X86/debug-names-verify-short2.s +++ test/tools/llvm-dwarfdump/X86/debug-names-verify-short2.s @@ -1,7 +1,7 @@ # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \ # RUN: not llvm-dwarfdump -verify - | FileCheck %s -# CHECK: Section too small: cannot read header augmentation. +# CHECK: error: unexpected end of data .section .debug_str,"MS",@progbits,1 .Lstring_producer: