[PATCH 3/4] ntdll: Set pthread stack to kernel stack range only.
Paul Gofman
pgofman at codeweavers.com
Mon Apr 11 05:26:33 CDT 2022
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
dlls/ntdll/unix/thread.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index 503230e4634..0f754493fdb 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -1339,8 +1339,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
thread_data->param = param;
pthread_attr_init( &pthread_attr );
- pthread_attr_setstack( &pthread_attr, teb->DeallocationStack,
- (char *)thread_data->kernel_stack + kernel_stack_size - (char *)teb->DeallocationStack );
+ pthread_attr_setstack( &pthread_attr, thread_data->kernel_stack, kernel_stack_size );
pthread_attr_setguardsize( &pthread_attr, 0 );
pthread_attr_setscope( &pthread_attr, PTHREAD_SCOPE_SYSTEM ); /* force creating a kernel thread */
InterlockedIncrement( &nb_threads );
--
2.35.1
More information about the wine-devel
mailing list