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

Unified Diff: base/tracked_objects.cc

Issue 8796006: Add memcheck annotation and remove suppression. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto trunk Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tracked_objects.cc
diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc
index 19d4786ee782a656f53473b267d495544a4e43cd..8bbd07e35845af830964aa85130dfb832a79a781 100644
--- a/base/tracked_objects.cc
+++ b/base/tracked_objects.cc
@@ -9,6 +9,7 @@
#include "base/format_macros.h"
#include "base/message_loop.h"
#include "base/stringprintf.h"
+#include "base/third_party/valgrind/memcheck.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "base/port.h"
@@ -219,6 +220,8 @@ ThreadData::~ThreadData() {}
void ThreadData::PushToHeadOfList() {
// Toss in a hint of randomness (atop the uniniitalized value).
+ (void)VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(random_number_,
+ sizeof(random_number_));
random_number_ += static_cast<int32>(this - static_cast<ThreadData*>(0));
random_number_ ^= (Now() - TrackedTime()).InMilliseconds();
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698