ntdll: Exit when we can't map the shared user data
André Hentschel
nerv at dawncrow.de
Tue Nov 27 12:35:08 CST 2012
http://bugs.winehq.org/show_bug.cgi?id=31892
we can't simply use some other address as kernel32 expects this one too.
---
dlls/ntdll/thread.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 8f8fdcf..5ab6164 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -200,6 +200,7 @@ HANDLE thread_init(void)
SIZE_T size, info_size;
HANDLE exe_file = 0;
LARGE_INTEGER now;
+ NTSTATUS status;
struct ntdll_thread_data *thread_data;
static struct debug_info debug_info; /* debug info for initial thread */
@@ -209,7 +210,13 @@ HANDLE thread_init(void)
addr = (void *)0x7ffe0000;
size = 0x10000;
- NtAllocateVirtualMemory( NtCurrentProcess(), &addr, 0, &size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE );
+ status = NtAllocateVirtualMemory( NtCurrentProcess(), &addr, 0, &size,
+ MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE );
+ if (FAILED(status))
+ {
+ MESSAGE( "wine: failed to map the shared user data: %08x\n", status );
+ exit(1);
+ }
user_shared_data = addr;
/* allocate and initialize the PEB */
--
1.8.0
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list