summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/miscfuncs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/miscfuncs.cc')
-rw-r--r--winsup/cygwin/miscfuncs.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index a166ca1da..e6bb6c31f 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
@@ -412,6 +412,7 @@ thread_wrapper (VOID *arg)
it's actually used by the thread function. So what we do here is
to compute the stackbase of the application-provided stack, move
_my_tls to the stackbase, and change the stack pointer accordingly. */
+ _my_tls.remove (0);
wrapper_arg.stackaddr = (PVOID) ((PBYTE) wrapper_arg.stackaddr
+ wrapper_arg.stacksize);
_tlsbase = (char *) wrapper_arg.stackaddr;