diff --git a/dlls/kernel/fiber.c b/dlls/kernel/fiber.c index da09d5fd054..c8e4068ac0a 100644 --- a/dlls/kernel/fiber.c +++ b/dlls/kernel/fiber.c @@ -93,7 +93,7 @@ LPVOID WINAPI CreateFiberEx( SIZE_T stack_commit, SIZE_T stack_reserve, DWORD fl /* FIXME: should use the thread stack allocation routines here */ if (!stack_reserve) stack_reserve = 1024*1024; - if(!(fiber->stack_allocation = VirtualAlloc( 0, stack_reserve, MEM_COMMIT, PAGE_EXECUTE_READWRITE ))) + if(!(fiber->stack_allocation = VirtualAlloc( 0, stack_reserve, MEM_COMMIT, PAGE_READWRITE ))) { HeapFree( GetProcessHeap(), 0, fiber ); return NULL; diff --git a/dlls/kernel/thread.c b/dlls/kernel/thread.c index 78a4dbeb2d4..be876687a8f 100644 --- a/dlls/kernel/thread.c +++ b/dlls/kernel/thread.c @@ -66,7 +66,7 @@ TEB *THREAD_InitStack( TEB *teb, DWORD stack_size ) stack_size = (stack_size + (page_size - 1)) & ~(page_size - 1); if (stack_size < 1024 * 1024) stack_size = 1024 * 1024; /* Xlib needs a large stack */ - if (!(base = VirtualAlloc( NULL, stack_size, MEM_COMMIT, PAGE_EXECUTE_READWRITE ))) + if (!(base = VirtualAlloc( NULL, stack_size, MEM_COMMIT, PAGE_READWRITE ))) return NULL; teb->DeallocationStack = base; @@ -75,7 +75,7 @@ TEB *THREAD_InitStack( TEB *teb, DWORD stack_size ) /* Setup guard pages */ - VirtualProtect( base, 1, PAGE_EXECUTE_READWRITE | PAGE_GUARD, &old_prot ); + VirtualProtect( base, 1, PAGE_READWRITE | PAGE_GUARD, &old_prot ); return teb; } diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index bc99d1a759c..f98f3fc04cf 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -192,7 +192,7 @@ static void start_thread( struct wine_pthread_thread_info *info ) size = info->stack_size; teb->DeallocationStack = info->stack_base; NtAllocateVirtualMemory( NtCurrentProcess(), &teb->DeallocationStack, 0, - &size, MEM_SYSTEM, PAGE_EXECUTE_READWRITE ); + &size, MEM_SYSTEM, PAGE_READWRITE ); /* limit is lower than base since the stack grows down */ teb->Tib.StackBase = (char *)info->stack_base + info->stack_size; teb->Tib.StackLimit = info->stack_base; @@ -200,7 +200,7 @@ static void start_thread( struct wine_pthread_thread_info *info ) /* setup the guard page */ size = 1; NtProtectVirtualMemory( NtCurrentProcess(), &teb->DeallocationStack, &size, - PAGE_EXECUTE_READWRITE | PAGE_GUARD, NULL ); + PAGE_READWRITE | PAGE_GUARD, NULL ); RtlFreeHeap( GetProcessHeap(), 0, info ); RtlAcquirePebLock();