diff options
Diffstat (limited to 'winsup/cygwin/init.cc')
-rw-r--r-- | winsup/cygwin/init.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index f73be72..6a1575d 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -156,7 +156,8 @@ dll_entry (HANDLE h, DWORD reason, void *static_load) munge_threadfunc (); break; case DLL_THREAD_DETACH: - if (hwait_sig) + if (hwait_sig && (void *) &_my_tls > (void *) &wow64_test_stack_marker + && _my_tls.isinitialized ()) _my_tls.remove (0); break; } |