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

Unified Diff: runtime/vm/scavenger.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/scavenger.cc
===================================================================
--- runtime/vm/scavenger.cc (revision 41609)
+++ runtime/vm/scavenger.cc (working copy)
@@ -16,6 +16,7 @@
#include "vm/object_id_ring.h"
#include "vm/stack_frame.h"
#include "vm/store_buffer.h"
+#include "vm/verified_memory.h"
#include "vm/verifier.h"
#include "vm/visitor.h"
#include "vm/weak_table.h"
@@ -227,6 +228,7 @@
memmove(reinterpret_cast<void*>(new_addr),
reinterpret_cast<void*>(raw_addr),
size);
+ VerifiedMemory::Accept(new_addr, size);
// Remember forwarding address.
ForwardTo(raw_addr, new_addr);
}
@@ -235,6 +237,7 @@
*p = new_obj;
// Update the store buffer as needed.
if (visiting_old_object_ != NULL) {
+ VerifiedMemory::Accept(reinterpret_cast<uword>(p), sizeof(*p));
UpdateStoreBuffer(p, new_obj);
}
}
@@ -356,7 +359,7 @@
return new SemiSpace(NULL);
} else {
intptr_t size_in_bytes = size_in_words << kWordSizeLog2;
- VirtualMemory* reserved = VirtualMemory::Reserve(size_in_bytes);
+ VirtualMemory* reserved = VerifiedMemory::Reserve(size_in_bytes);
if ((reserved == NULL) || !reserved->Commit(false)) { // Not executable.
// TODO(koda): If cache_ is not empty, we could try to delete it.
delete reserved;
@@ -486,7 +489,7 @@
// objects candidates for promotion next time.
survivor_end_ = end_;
}
-
+ VerifiedMemory::Accept(to_->start(), to_->end() - to_->start());
#if defined(DEBUG)
// We can only safely verify the store buffers from old space if there is no
// concurrent old space task. At the same time we prevent new tasks from

Powered by Google App Engine
This is Rietveld 408576698