summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-07-27 23:13:05 +0000
committerReid Kleckner <rnk@google.com>2017-07-27 23:13:05 +0000
commitef443296a4057193d743ea3981c24aa8027f2de5 (patch)
tree536feea2811d5253320f40842839e0efb25e8135
parent1a26f24f352798d37bbb66d532224e0c858f6080 (diff)
downloadbcm5719-llvm-ef443296a4057193d743ea3981c24aa8027f2de5.tar.gz
bcm5719-llvm-ef443296a4057193d743ea3981c24aa8027f2de5.zip
[PDB] Initialize the std::array<ulittle32_t> used for the gsi bitmap
With ASan, we would write about 512 bytes of malloc fill value to the PDB, with some random bits ORed in here and there. Dumping the PDB would always fail reliably. llvm-svn: 309331
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/PublicsStreamBuilder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PublicsStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/PublicsStreamBuilder.cpp
index 473cdddd2d6..9b807c1653e 100644
--- a/llvm/lib/DebugInfo/PDB/Native/PublicsStreamBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/PublicsStreamBuilder.cpp
@@ -201,6 +201,8 @@ void GSIHashTableBuilder::addSymbols(ArrayRef<CVSymbol> Symbols) {
// Compute the three tables: the hash records in bucket and chain order, the
// bucket presence bitmap, and the bucket chain start offsets.
HashRecords.reserve(Symbols.size());
+ for (ulittle32_t &Word : HashBitmap)
+ Word = 0;
for (size_t BucketIdx = 0; BucketIdx < IPHR_HASH + 1; ++BucketIdx) {
auto &Bucket = TmpBuckets[BucketIdx];
if (Bucket.empty())
OpenPOWER on IntegriCloud