summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-18 23:57:49 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-18 23:57:49 +0000
commit45b9eba19e8411908ae1fa4b2fc90a139fe5e07a (patch)
treef26b893764e1e09fd13441534b07e6084bd01acc /base
parent7549d8d9660ac1a2531aa1bcc0ebd92bd19189b1 (diff)
downloadchromium_src-45b9eba19e8411908ae1fa4b2fc90a139fe5e07a.zip
chromium_src-45b9eba19e8411908ae1fa4b2fc90a139fe5e07a.tar.gz
chromium_src-45b9eba19e8411908ae1fa4b2fc90a139fe5e07a.tar.bz2
Fix Valgrind unittests by forcing illegal memory accesses to happen unconditionally.
BUG=none TEST=none Review URL: http://codereview.chromium.org/3838006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/tools_sanity_unittest.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc
index 0f21381..2824836 100644
--- a/base/tools_sanity_unittest.cc
+++ b/base/tools_sanity_unittest.cc
@@ -36,11 +36,13 @@ void ReadUninitializedValue(char *ptr) {
}
void ReadValueOutOfArrayBoundsLeft(char *ptr) {
- LOG(INFO) << "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) {
- LOG(INFO) << "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.