[llvm] r237523 - DenseMap: Remove poisoning of unused memory.
Benjamin Kramer
benny.kra at googlemail.com
Sat May 16 07:19:54 PDT 2015
Author: d0k
Date: Sat May 16 09:19:54 2015
New Revision: 237523
URL: http://llvm.org/viewvc/llvm-project?rev=237523&view=rev
Log:
DenseMap: Remove poisoning of unused memory.
DenseMap has great support for catching invalidated iterators now so we can get
rid of this crude hack. Use after frees are covered by asan.
Modified:
llvm/trunk/include/llvm/ADT/DenseMap.h
Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=237523&r1=237522&r2=237523&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Sat May 16 09:19:54 2015
@@ -272,10 +272,6 @@ protected:
P->getSecond().~ValueT();
P->getFirst().~KeyT();
}
-
-#ifndef NDEBUG
- memset((void*)getBuckets(), 0x5a, sizeof(BucketT)*getNumBuckets());
-#endif
}
void initEmpty() {
@@ -312,12 +308,6 @@ protected:
}
B->getFirst().~KeyT();
}
-
-#ifndef NDEBUG
- if (OldBucketsBegin != OldBucketsEnd)
- memset((void*)OldBucketsBegin, 0x5a,
- sizeof(BucketT) * (OldBucketsEnd - OldBucketsBegin));
-#endif
}
template <typename OtherBaseT>
More information about the llvm-commits
mailing list