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

Side by Side Diff: third_party/re2/patches/sparse-array-valgrind.patch

Issue 1516543002: Update re2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update instructions Created 5 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 diff --git a/third_party/re2/util/sparse_array.h b/third_party/re2/util/sparse_a rray.h
2 index 4ee5c94..7bc3a86 100644
3 --- a/third_party/re2/util/sparse_array.h
4 +++ b/third_party/re2/util/sparse_array.h
5 @@ -273,13 +273,13 @@ void SparseArray<Value>::resize(int new_max_size) {
6 int* a = new int[new_max_size];
7 if (sparse_to_dense_) {
8 memmove(a, sparse_to_dense_, max_size_*sizeof a[0]);
9 - // Don't need to zero the memory but appease Valgrind.
10 - if (valgrind_) {
11 - for (int i = max_size_; i < new_max_size; i++)
12 - a[i] = 0xababababU;
13 - }
14 delete[] sparse_to_dense_;
15 }
16 + // Don't need to zero the memory but appease Valgrind.
17 + if (valgrind_) {
18 + for (int i = max_size_; i < new_max_size; i++)
19 + a[i] = 0xababababU;
20 + }
21 sparse_to_dense_ = a;
22
23 dense_.resize(new_max_size);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698