[lldb] Default initialize DWARFDebugMacroHeader
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 16 Feb 2022 18:01:04 +0000 (10:01 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 16 Feb 2022 18:38:05 +0000 (10:38 -0800)
Default initialize the DWARFDebugMacroHeader to avoid returning a header
with uninitialized variables from DWARFDebugMacroHeader::ParseHeader.

lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.h

index 5c0338e..cbf7624 100644 (file)
@@ -43,9 +43,9 @@ private:
   SkipOperandTable(const lldb_private::DWARFDataExtractor &debug_macro_data,
                    lldb::offset_t *offset);
 
-  uint16_t m_version;
-  bool m_offset_is_64_bit;
-  uint64_t m_debug_line_offset;
+  uint16_t m_version = 0;
+  bool m_offset_is_64_bit = false;
+  uint64_t m_debug_line_offset = 0;
 };
 
 class DWARFDebugMacroEntry {