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

Issue 106593002: Write protect executable pages in the VM.

Created:
7 years ago by Kevin Millikin (Google)
Modified:
7 years ago
Reviewers:
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Write protect executable pages in the VM. Change executable pages to be read/execute but not writable by default. All pages are made temporarily writable just before a full GC, because both the mark and sweep phases write to the pages. When allocating in a page and when patching code, the pages are made temporarily writable. The order of allocation of Code and Instructions objects is changed so that a GC will not occur after Instructions is allocated. (A full GC would render the Instructions unwritable.) A scoped object is used to make memory protection simpler.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -107 lines) Patch
M runtime/vm/assembler.h View 2 chunks +6 lines, -0 lines 0 comments Download
M runtime/vm/assembler.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M runtime/vm/assembler_arm.h View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/assembler_arm.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/assembler_ia32.h View 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/assembler_ia32.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/assembler_mips.h View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/assembler_mips.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/assembler_x64.h View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/code_generator.cc View 3 chunks +21 lines, -7 lines 0 comments Download
M runtime/vm/code_patcher.h View 1 chunk +11 lines, -0 lines 0 comments Download
M runtime/vm/code_patcher.cc View 3 chunks +40 lines, -9 lines 0 comments Download
M runtime/vm/dart.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/debugger.cc View 2 chunks +57 lines, -53 lines 0 comments Download
M runtime/vm/freelist.h View 3 chunks +10 lines, -2 lines 0 comments Download
M runtime/vm/freelist.cc View 7 chunks +94 lines, -8 lines 0 comments Download
M runtime/vm/freelist_test.cc View 1 chunk +10 lines, -9 lines 0 comments Download
M runtime/vm/instructions_arm_test.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/instructions_ia32_test.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M runtime/vm/instructions_mips_test.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/instructions_x64_test.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 5 chunks +16 lines, -8 lines 0 comments Download
M runtime/vm/pages.cc View 5 chunks +43 lines, -2 lines 0 comments Download
M runtime/vm/virtual_memory.h View 2 chunks +6 lines, -1 line 0 comments Download
M runtime/vm/virtual_memory.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/virtual_memory_android.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M runtime/vm/virtual_memory_linux.cc View 3 chunks +9 lines, -2 lines 0 comments Download
M runtime/vm/virtual_memory_macos.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M runtime/vm/virtual_memory_win.cc View 2 chunks +8 lines, -2 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698