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

Unified Diff: runtime/vm/object.cc

Issue 711833002: Support verified heap pointer writes on ia32. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 41609)
+++ runtime/vm/object.cc (working copy)
@@ -44,6 +44,7 @@
#include "vm/tags.h"
#include "vm/timer.h"
#include "vm/unicode.h"
+#include "vm/verified_memory.h"
#include "vm/weak_code.h"
namespace dart {
@@ -1698,6 +1699,7 @@
tags = RawObject::ClassIdTag::update(class_id, tags);
tags = RawObject::SizeTag::update(size, tags);
reinterpret_cast<RawObject*>(address)->tags_ = tags;
+ VerifiedMemory::Accept(address, size);
}
@@ -1807,6 +1809,7 @@
memmove(reinterpret_cast<uint8_t*>(clone_addr + kHeaderSizeInBytes),
reinterpret_cast<uint8_t*>(orig_addr + kHeaderSizeInBytes),
size - kHeaderSizeInBytes);
+ VerifiedMemory::Accept(clone_addr, size);
// Add clone to store buffer, if needed.
if (!raw_clone->IsOldObject()) {
// No need to remember an object in new space.
@@ -12164,6 +12167,7 @@
MemoryRegion region(reinterpret_cast<void*>(instrs.EntryPoint()),
instrs.size());
assembler->FinalizeInstructions(region);
+ VerifiedMemory::Accept(region.start(), region.size());
CPU::FlushICache(instrs.EntryPoint(), instrs.size());
code.set_compile_timestamp(OS::GetCurrentTimeMicros());
@@ -18804,6 +18808,8 @@
space));
NoGCScope no_gc;
raw->StoreSmi(&(raw->ptr()->length_), Smi::New(len));
+ VerifiedMemory::Accept(reinterpret_cast<uword>(raw->ptr()),
+ Array::InstanceSize(len));
return raw;
}
}
« runtime/vm/assembler_ia32.cc ('K') | « runtime/vm/object.h ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698