ntdll/tests: Add ARM support for map protection tests

André Hentschel nerv at dawncrow.de
Fri Nov 29 16:36:44 CST 2013


---
 dlls/ntdll/tests/info.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index ef1bed5..2510646 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -1359,8 +1359,12 @@ static void test_mapprotection(void)
     addr = NULL;
     status = pNtMapViewOfSection ( h, GetCurrentProcess(), &addr, 0, 0, &offset, &count, ViewShare, 0, PAGE_READWRITE);
     ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
-#if defined(__x86_64__) || defined(__i386__)
-    memset (addr, 0xc3, 1); /* lret ... in both i386 and x86_64 */
+#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
+#if defined(__arm__)
+    *(unsigned int*)addr = 0xe12fff1e; /* bx lr */
+#else
+    *(unsigned char*)addr = 0xc3; /* lret ... in both i386 and x86_64 */
+#endif
     trace("trying to execute code in the readwrite only mapped anon file...\n");
     f = addr;f();
     trace("...done.\n");
-- 
1.8.1.2




More information about the wine-patches mailing list