Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: third_party/re2/util/sparse_set.h

Issue 149723005: Patch re2 to support MSan. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« third_party/re2/util/sparse_array.h ('K') | « third_party/re2/util/sparse_array.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/util/sparse_set.h
diff --git a/third_party/re2/util/sparse_set.h b/third_party/re2/util/sparse_set.h
index 165dd090eb49df4fc4a96259eb707d2d8a2370c7..f59ed0b031ea3f104421a05f186be267f4e3100e 100644
--- a/third_party/re2/util/sparse_set.h
+++ b/third_party/re2/util/sparse_set.h
@@ -54,13 +54,24 @@ namespace re2 {
class SparseSet {
public:
SparseSet()
- : size_(0), max_size_(0), sparse_to_dense_(NULL), dense_(NULL), valgrind_(RunningOnValgrind()) {}
+ : size_(0), max_size_(0), sparse_to_dense_(NULL), dense_(NULL),
+#if defined(MEMORY_SANITIZER)
+ valgrind_(true)
+#else
+ valgrind_(RunningOnValgrind())
+#endif
+ {
+ }
SparseSet(int max_size) {
max_size_ = max_size;
sparse_to_dense_ = new int[max_size];
dense_ = new int[max_size];
+#if defined(MEMORY_SANITIZER)
+ valgrind_ = true;
+#else
valgrind_ = RunningOnValgrind();
+#endif
// Don't need to zero the memory, but do so anyway
// to appease Valgrind.
if (valgrind_) {
« third_party/re2/util/sparse_array.h ('K') | « third_party/re2/util/sparse_array.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698