diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-11-20 19:23:14 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-11-20 19:23:14 +0300 |
commit | f2a0724fca10e91e2d5f3120c7c6db6d9462a905 (patch) | |
tree | 2a817b6d97a4a70fe3e9ad7a0a6937bcb9893317 /winsup/cygwin | |
parent | 556b13a0c2a94c35ddcb373232d31d99e9a661d7 (diff) |
* init.cc (dll_entry): Call _my_tls.remove with INFINITE wait period
to avoid SEGVs and subsequent hangs in _cygtls::find_tls.
* miscfuncs.cc (thread_wrapper): Ditto.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/init.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/miscfuncs.cc | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 46cd4c3fa..17ac09b82 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2014-11-20 Corinna Vinschen <corinna@vinschen.de> + + * init.cc (dll_entry): Call _my_tls.remove with INFINITE wait period + to avoid SEGVs and subsequent hangs in _cygtls::find_tls. + * miscfuncs.cc (thread_wrapper): Ditto. + 2014-11-20 Iuliu Rus <rus.iuliu@gmail.com> * net.cc (fdsock): Change default values for socket buffers on 32 bit diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index 78e88b94b..f01f35e5f 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -95,7 +95,7 @@ dll_entry (HANDLE h, DWORD reason, void *static_load) if (dll_finished_loading && (PVOID) &_my_tls > (PVOID) &test_stack_marker && _my_tls.isinitialized ()) - _my_tls.remove (0); + _my_tls.remove (INFINITE); break; } diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index eee47a53a..14ead9152 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -564,7 +564,7 @@ thread_wrapper (PVOID arg) cfree (arg); /* Remove _cygtls from this stack since it won't be used anymore. */ - _my_tls.remove (0); + _my_tls.remove (INFINITE); /* Set stack values in TEB */ PTEB teb = NtCurrentTeb (); |