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

Unified Diff: runtime/vm/native_arguments.h

Issue 816123002: MemorySanitizer support. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/exceptions.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_arguments.h
===================================================================
--- runtime/vm/native_arguments.h (revision 42458)
+++ runtime/vm/native_arguments.h (working copy)
@@ -6,6 +6,7 @@
#define VM_NATIVE_ARGUMENTS_H_
#include "platform/assert.h"
+#include "platform/memory_sanitizer.h"
#include "vm/globals.h"
#include "vm/handles_impl.h"
#include "vm/simulator.h"
@@ -89,7 +90,10 @@
RawObject* ArgAt(int index) const {
ASSERT((index >= 0) && (index < ArgCount()));
- return (*argv_)[-index];
+ RawObject** arg_ptr = &((*argv_)[-index]);
+ // Tell MemorySanitizer the RawObject* was initialized (by generated code).
+ MSAN_UNPOISON(arg_ptr, kWordSize);
+ return *arg_ptr;
}
int NativeArgCount() const {
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698