From c672a9b1f35de3f045d9bc3171e1b936eb00267a Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 17 Nov 2015 23:26:06 +0000 Subject: [PATCH] Fix read-of-uninitialized introduced in r253277 exposed on some buildbots Verified that this was at least /an/ issue, if not the only one, by initializing NumBuckets to 1 (previously it was uninitialized, so if this change made a difference, which it did (causing a bunch of tests to crash) it demonstrates use-of-uninitialized memory). Initializing then removes the crashes. Thanks Reid for the debugging assistance git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253395 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h b/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h index f2b3010e77b..0d49d7c0cf8 100644 --- a/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h +++ b/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h @@ -33,7 +33,7 @@ class DWARFUnitIndex { uint32_t Version; uint32_t NumColumns; uint32_t NumUnits; - uint32_t NumBuckets; + uint32_t NumBuckets = 0; bool parse(DataExtractor IndexData, uint32_t *OffsetPtr); void dump(raw_ostream &OS) const; -- 2.34.1