[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
This commit is contained in:
Reid Kleckner 2017-07-27 23:13:05 +00:00
parent 1a26f24f35
commit ef443296a4
1 changed files with 2 additions and 0 deletions

View File

@ -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())