Cygwin: x86_64: pthreads: Install exception handler after switching stack

After creating a pthread, the stack gets moved to the desired memory
location.  While the 32 bit thread wrapper copies the exception handler
information to the new stack (so we have at least *some* exception
handler present), the x86_64 code didn't perform any exception handler
magic.  Fix that.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2019-01-30 20:05:39 +01:00
parent ba3e20894d
commit 9a5abcc896
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ details. */
#include "cygheap.h"
#include "ntdll.h"
#include "cygwait.h"
#include "exception.h"
extern "C" void __fp_lock_all ();
extern "C" void __fp_unlock_all ();
@ -1990,6 +1991,7 @@ pthread_spinlock::unlock ()
DWORD WINAPI
pthread::thread_init_wrapper (void *arg)
{
exception protect;
pthread *thread = (pthread *) arg;
/* This *must* be set prior to calling set_tls_self_pointer or there is
a race with the signal processing code which may miss the signal mask