diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2019-01-30 22:05:39 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-01-30 22:05:39 +0300 |
commit | 9a5abcc896bde48ae72fd62fe43a2307663d8ad5 (patch) | |
tree | 13fd43cc7f59a1948bcafbf1897f719ec33eed8c | |
parent | ba3e20894d068d34186e485563cc1ab2819e8f5f (diff) |
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>
-rw-r--r-- | winsup/cygwin/thread.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index c7b7e5157..f353dd497 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -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 |