diff options
author | Reid Kleckner <rnk@google.com> | 2017-07-27 23:13:05 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-07-27 23:13:05 +0000 |
commit | ef443296a4057193d743ea3981c24aa8027f2de5 (patch) | |
tree | 536feea2811d5253320f40842839e0efb25e8135 | |
parent | 1a26f24f352798d37bbb66d532224e0c858f6080 (diff) | |
download | bcm5719-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.cpp | 2 |
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()) |