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

Unified Diff: base/tools_sanity_unittest.cc

Issue 3838006: Fix Valgrind unittests by forcing illegal memory accesses to happen unconditi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tools_sanity_unittest.cc
===================================================================
--- base/tools_sanity_unittest.cc (revision 62960)
+++ base/tools_sanity_unittest.cc (working copy)
@@ -36,11 +36,13 @@
}
void ReadValueOutOfArrayBoundsLeft(char *ptr) {
- VLOG(1) << "Reading a byte out of bounds: " << ptr[-2];
+ char c = ptr[-2];
+ VLOG(1) << "Reading a byte out of bounds: " << c;
}
void ReadValueOutOfArrayBoundsRight(char *ptr, size_t size) {
- VLOG(1) << "Reading a byte out of bounds: " << ptr[size + 1];
+ char c = ptr[size + 1];
+ VLOG(1) << "Reading a byte out of bounds: " << c;
}
// This is harmless if you run it under Valgrind thanks to redzones.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698