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

Unified Diff: base/tracked_objects.cc

Issue 12951003: Annotate ThreadData::PushToHeadOfList for MemorySanitizer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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
« base/compiler_specific.h ('K') | « base/compiler_specific.h ('k') | no next file » | 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 b3bc975374275e56ee40fc6959fea3d6b29fc8c7..209ec7dc904af14fd753baace1dd9a9b74922db7 100644
--- a/base/tracked_objects.cc
+++ b/base/tracked_objects.cc
@@ -7,6 +7,7 @@
#include <math.h>
#include <stdlib.h>
+#include "base/compiler_specific.h"
#include "base/format_macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/process_util.h"
@@ -258,6 +259,7 @@ 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_));
+ __msan_unpoison(&random_number_, sizeof(random_number_));
Alexander Potapenko 2013/03/20 11:19:43 As I've said before, it isn't obvious that __msan_
random_number_ += static_cast<int32>(this - static_cast<ThreadData*>(0));
random_number_ ^= (Now() - TrackedTime()).InMilliseconds();
« base/compiler_specific.h ('K') | « base/compiler_specific.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698