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

Unified Diff: base/compiler_specific.h

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
« no previous file with comments | « no previous file | base/tracked_objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/compiler_specific.h
diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index 5d7d9d11019bd22bc0a9c9e28f06ccb036566a5e..01c1eb1939b52cc0493f0d8af8b38da15aca33fa 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -166,4 +166,19 @@
// If available, it would look like:
// __attribute__((format(wprintf, format_param, dots_param)))
+
+// MemorySanitizer annotations.
+#ifdef MEMORY_SANITIZER
+extern "C" {
+void __msan_unpoison(const void *p, unsigned long s);
+} // extern "C"
+
+// Mark a memory region fully initialized.
+// Use this to annotate code that deliberately reads uninitialized data, for
+// example a GC scavenging root set pointers from the stack.
+#define MSAN_UNPOISON(p, s) __msan_unpoison(p, s)
+#else // MEMORY_SANITIZER
+#define MSAN_UNPOISON(p, s)
+#endif // MEMORY_SANITIZER
+
#endif // BASE_COMPILER_SPECIFIC_H_
« no previous file with comments | « no previous file | base/tracked_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698