Rebase against 1b9d48a7b01e2b715af46bc1f8d5fe6f1529782c.

This commit is contained in:
Alistair Leslie-Hughes
2022-03-04 11:02:37 +11:00
parent 9fa3c96cff
commit 0648126dae
22 changed files with 141 additions and 143 deletions

View File

@@ -1,4 +1,4 @@
From a1b46c58e7663a0c17d5dd2fbb3cc82fde40a06c Mon Sep 17 00:00:00 2001
From 7acf9c0e6c7f4bf86b1946778366b529a42fa660 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 1 Jun 2017 06:04:53 +0200
Subject: [PATCH] ntdll: Fix holes in ELF mappings. (v2)
@@ -10,10 +10,10 @@ Based on a patch by Andrew Wesie.
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 209a2647d16..2fbb5922359 100644
index 0c1c91750ea..c4fcf43543f 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -1021,6 +1021,16 @@ static inline BOOL is_write_watch_range( const void *addr, size_t size )
@@ -1210,6 +1210,16 @@ static inline BOOL is_write_watch_range( const void *addr, size_t size )
}
@@ -30,7 +30,7 @@ index 209a2647d16..2fbb5922359 100644
/***********************************************************************
* find_view_range
*
@@ -3051,6 +3061,19 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack )
@@ -3416,6 +3426,19 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack )
/* ignore fault if page is writable now */
if (get_unix_prot( get_page_vprot( page ) ) & PROT_WRITE) ret = STATUS_SUCCESS;
}
@@ -51,10 +51,10 @@ index 209a2647d16..2fbb5922359 100644
return ret;
}
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c
index d85099455aa..be12af58311 100644
index 519e39c3df0..c29168646e8 100644
--- a/dlls/psapi/tests/psapi_main.c
+++ b/dlls/psapi/tests/psapi_main.c
@@ -195,6 +195,7 @@ todo_wine
@@ -194,6 +194,7 @@ static void test_EnumProcessModules(void)
static void test_GetModuleInformation(void)
{
HMODULE hMod = GetModuleHandleA(NULL);
@@ -62,29 +62,29 @@ index d85099455aa..be12af58311 100644
MODULEINFO info;
DWORD ret;
@@ -214,10 +215,21 @@ static void test_GetModuleInformation(void)
@@ -213,10 +214,21 @@ static void test_GetModuleInformation(void)
GetModuleInformation(hpQV, hMod, &info, sizeof(info)-1);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError());
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %ld\n", GetLastError());
- SetLastError(0xdeadbeef);
ret = GetModuleInformation(hpQV, hMod, &info, sizeof(info));
ok(ret == 1, "failed with %d\n", GetLastError());
ok(ret == 1, "failed with %ld\n", GetLastError());
ok(info.lpBaseOfDll == hMod, "lpBaseOfDll=%p hMod=%p\n", info.lpBaseOfDll, hMod);
+
+ hMod = LoadLibraryA("shell32.dll");
+ ok(hMod != NULL, "Failed to load shell32.dll, error: %u\n", GetLastError());
+ ok(hMod != NULL, "Failed to load shell32.dll, error: %lu\n", GetLastError());
+
+ ret = GetModuleInformation(hpQV, hMod, &info, sizeof(info));
+ ok(ret == 1, "failed with %d\n", GetLastError());
+ ok(ret == 1, "failed with %lu\n", GetLastError());
+ info.SizeOfImage /= sizeof(DWORD);
+ for (tmp = (DWORD *)hMod; info.SizeOfImage; info.SizeOfImage--)
+ counter ^= *tmp++;
+ trace("xor of shell32: %08x\n", counter);
+ trace("xor of shell32: %08lx\n", counter);
+
+ FreeLibrary(hMod);
}
static BOOL check_with_margin(SIZE_T perf, SIZE_T sysperf, int margin)
--
2.28.0
2.34.1