summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 17:41:43 +0000
committervangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 17:41:43 +0000
commit27d605c6a74cc0505e329efa7ee06ebcbdad015f (patch)
tree0dd034ad307201eafa91630861b6ca663b03a76d
parentad4cfdc3b2d7f3f31476f6d307e7f3528bec9f5e (diff)
downloadchromium_src-27d605c6a74cc0505e329efa7ee06ebcbdad015f.zip
chromium_src-27d605c6a74cc0505e329efa7ee06ebcbdad015f.tar.gz
chromium_src-27d605c6a74cc0505e329efa7ee06ebcbdad015f.tar.bz2
Revert 64240 - Pass the correct array size to readlink, and pass the length of the result to the string constructor
Suspect for causing failures in ChromiumOS linux builders ("terminate called after throwing an instance of 'std::length_error'") BUG=none TEST=none Review URL: http://codereview.chromium.org/4181004 TBR=jochen@chromium.org Review URL: http://codereview.chromium.org/4143006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64269 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/logging_chrome.cc4
-rw-r--r--tools/valgrind/memcheck/suppressions.txt7
2 files changed, 9 insertions, 2 deletions
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index a1963ce..9bbb878 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -171,9 +171,9 @@ FilePath SetUpSymlinkIfNeeded(const FilePath& symlink_path, bool new_log) {
}
} else {
char buf[1024];
- size_t count = readlink(target_path.value().c_str(), buf, arraysize(buf));
+ size_t count = readlink(target_path.value().c_str(), buf, sizeof(buf));
if (count > 0) {
- target_path = FilePath(FilePath::StringType(buf, count));
+ target_path = FilePath(FilePath::StringType(buf));
} else {
PLOG(ERROR) << "Unable to read symlink " << symlink_path.value();
}
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index 12feeb3..25238cb 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -3247,3 +3247,10 @@
fun:PKIX_PL_OcspCertID_Create
fun:pkix_OcspChecker_CheckLocal
}
+{
+ logging_chrome_to_be_removed
+ Memcheck:Cond
+ fun:strlen
+ ...
+ fun:*logging16DetermineLogMode*
+}