about summary refs log tree commit diff stats
path: root/test/jitter/vm_mngr.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2020-01-29 13:51:09 +0100
committerGitHub <noreply@github.com>2020-01-29 13:51:09 +0100
commit1dc08a7276e2732358c3f4c158fd452a1fb081f4 (patch)
tree81c39e5f11b6bc8bd26471ae67d058b7c8840a68 /test/jitter/vm_mngr.py
parent232accb6b23c284bf4c30ac89c6f0524010fbfa1 (diff)
parent19a25f3831a8a8f0fea07295a1e23d405cacd978 (diff)
downloadmiasm-1dc08a7276e2732358c3f4c158fd452a1fb081f4.tar.gz
miasm-1dc08a7276e2732358c3f4c158fd452a1fb081f4.zip
Merge pull request #1121 from carolineLe/fix_virtualprotect
Win_API: Fix VirtualProtect on multiple areas
Diffstat (limited to 'test/jitter/vm_mngr.py')
-rw-r--r--test/jitter/vm_mngr.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/jitter/vm_mngr.py b/test/jitter/vm_mngr.py
index 468fb347..0fec1734 100644
--- a/test/jitter/vm_mngr.py
+++ b/test/jitter/vm_mngr.py
@@ -25,3 +25,11 @@ for i, access_right in enumerate(shuffled_rights):
 # Check for modification
 for i, access_right in enumerate(shuffled_rights):
     assert myjit.vm.get_mem_access(base_addr + i * page_size) == access_right
+
+# Remove pages
+for i in range(len(rights)):
+    myjit.vm.remove_memory_page(base_addr + i * page_size)
+
+# Add pages again
+for i, access_right in enumerate(rights):
+    myjit.vm.add_memory_page(base_addr + i * page_size, access_right, data)