Naveen Narayanan : ntdll: Set pthread stack guard size to 0 for NetBSD.

Alexandre Julliard julliard at winehq.org
Tue Aug 13 14:54:34 CDT 2019


Module: wine
Branch: master
Commit: de5392bfe7919c180d6650eec7b57b5386a4796f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=de5392bfe7919c180d6650eec7b57b5386a4796f

Author: Naveen Narayanan <zerous at nocebo.space>
Date:   Mon Aug 12 19:29:22 2019 +0200

ntdll: Set pthread stack guard size to 0 for NetBSD.

pthread_attr_setstack(3) in NetBSD 8.0 and newer sets the guard size
to 65536 and extends the stack beyond the specified range.

Signed-off-by: Naveen Narayanan <zerous at nocebo.space>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/thread.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 126bf76..97bd4bf 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -525,6 +525,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
     pthread_attr_init( &attr );
     pthread_attr_setstack( &attr, teb->DeallocationStack,
                          (char *)teb->Tib.StackBase + extra_stack - (char *)teb->DeallocationStack );
+    pthread_attr_setguardsize( &attr, 0 );
     pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM ); /* force creating a kernel thread */
     interlocked_xchg_add( &nb_threads, 1 );
     if (pthread_create( &pthread_id, &attr, (void * (*)(void *))start_thread, info ))




More information about the wine-cvs mailing list