Closed GoogleCodeExporter closed 9 years ago
This issue was closed by revision 975db9909185.
Original comment by rsc@swtch.com
on 10 Jan 2014 at 1:49
I believe you missed this chunk in the patch:
@@ -273,11 +274,16 @@
if (sparse_to_dense_) {
memmove(a, sparse_to_dense_, max_size_*sizeof a[0]);
// Don't need to zero the memory but appease Valgrind.
- if (valgrind_) {
+ if (zero_memory_) {
for (int i = max_size_; i < new_max_size; i++)
a[i] = 0xababababU;
}
delete[] sparse_to_dense_;
+ } else {
+ if (zero_memory_) {
+ for (int i = 0; i < new_max_size; i++)
+ a[i] = 0xababababU;
+ }
}
The code in SparseArray<Value>::resize zero-initializes part of
sparse_to_dense_ if it is reallocated, but does nothing if it is allocated for
the first time.
Original comment by euge...@google.com
on 30 Jan 2014 at 1:37
Filed as https://code.google.com/p/re2/issues/detail?id=106
Original comment by euge...@google.com
on 7 Feb 2014 at 10:54
Original issue reported on code.google.com by
euge...@google.com
on 21 Mar 2013 at 9:22Attachments: