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

Unified Diff: runtime/vm/instructions_x64_test.cc

Issue 136563002: Landing: Write protect executable pages in the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 | « runtime/vm/instructions_mips_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_x64_test.cc
===================================================================
--- runtime/vm/instructions_x64_test.cc (revision 32487)
+++ runtime/vm/instructions_x64_test.cc (working copy)
@@ -44,6 +44,13 @@
ASSEMBLER_TEST_RUN(Jump, test) {
ASSERT(prologue_code_size != -1);
+ const Code& code = test->code();
+ const Instructions& instrs = Instructions::Handle(code.instructions());
+ bool status =
+ VirtualMemory::Protect(reinterpret_cast<void*>(instrs.EntryPoint()),
+ instrs.size(),
+ VirtualMemory::kReadWrite);
+ EXPECT(status);
JumpPattern jump1(test->entry() + prologue_code_size, test->code());
jump1.IsValid();
EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
« no previous file with comments | « runtime/vm/instructions_mips_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698