summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2019-03-15 18:00:43 +0000
committerZachary Turner <zturner@google.com>2019-03-15 18:00:43 +0000
commit98661d02210e93dfe444db131ede059c55fac4f5 (patch)
tree272b94517f608a443fe4f5488feb05d834501307
parenta70c9d49af4f230453947c4453644398d6f6aa47 (diff)
downloadbcm5719-llvm-98661d02210e93dfe444db131ede059c55fac4f5.tar.gz
bcm5719-llvm-98661d02210e93dfe444db131ede059c55fac4f5.zip
Abbreviation declarations are required to have non-null tags.
Treat a null tag as an error. llvm-svn: 356284
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
index 7f073cbc2a6..b9b0e171e5f 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
@@ -34,11 +34,9 @@ DWARFAbbreviationDeclaration::extract(const DWARFDataExtractor &data,
m_attributes.clear();
m_tag = data.GetULEB128(offset_ptr);
- if (m_tag == DW_TAG_null) {
- // FIXME: According to the DWARF spec this may actually be malformed.
- // Should this return an error instead?
- return DWARFEnumState::Complete;
- }
+ if (m_tag == DW_TAG_null)
+ return llvm::make_error<llvm::object::GenericBinaryError>(
+ "abbrev decl requires non-null tag.");
m_has_children = data.GetU8(offset_ptr);
OpenPOWER on IntegriCloud