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

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

Issue 149723005: Patch re2 to support MSan. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address eugenis's suggestions 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
« no previous file with comments | « third_party/re2/patches/re2-msan.patch ('k') | third_party/re2/util/sparse_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/util/sparse_array.h
diff --git a/third_party/re2/util/sparse_array.h b/third_party/re2/util/sparse_array.h
index 3e33f8999315d0c0e0fd3138ee70bafea2eed227..4ee5c949ca25687819646e266d1ca8c3f59fbdac 100644
--- a/third_party/re2/util/sparse_array.h
+++ b/third_party/re2/util/sparse_array.h
@@ -231,7 +231,8 @@ class SparseArray {
template<typename Value>
SparseArray<Value>::SparseArray()
- : size_(0), max_size_(0), sparse_to_dense_(NULL), dense_(), valgrind_(RunningOnValgrind()) {}
+ : size_(0), max_size_(0), sparse_to_dense_(NULL), dense_(),
+ valgrind_(RunningOnValgrindOrMemorySanitizer()) {}
// IndexValue pairs: exposed in SparseArray::iterator.
template<typename Value>
@@ -418,7 +419,7 @@ void SparseArray<Value>::create_index(int i) {
template<typename Value> SparseArray<Value>::SparseArray(int max_size) {
max_size_ = max_size;
sparse_to_dense_ = new int[max_size];
- valgrind_ = RunningOnValgrind();
+ valgrind_ = RunningOnValgrindOrMemorySanitizer();
dense_.resize(max_size);
// Don't need to zero the new memory, but appease Valgrind.
if (valgrind_) {
« no previous file with comments | « third_party/re2/patches/re2-msan.patch ('k') | third_party/re2/util/sparse_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698