aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2017-03-10 20:28:09 +0100
committerCorinna Vinschen <corinna@vinschen.de>2017-03-10 20:28:09 +0100
commit35d344babe154bde4e5dfcc01638251cc50e2e79 (patch)
treeb3f713ccc346617f36a1053058b79e5ffc383047 /winsup/cygwin/dcrt0.cc
parent44b1746a41921533d27aca414a9188314cb725b6 (diff)
downloadnewlib-35d344babe154bde4e5dfcc01638251cc50e2e79.zip
newlib-35d344babe154bde4e5dfcc01638251cc50e2e79.tar.gz
newlib-35d344babe154bde4e5dfcc01638251cc50e2e79.tar.bz2
_dll_crt0: Drop incorrect check for being started from parent main thread
This test was broken from the start. It leads to creating a completely new stack for the main thread of the child process when started from the main thread of the parent. However, the main thread of a process can easily running on a completely different stack, if the parent's main thread was created by calling fork() from a pthread. For an example, see https://cygwin.com/ml/cygwin/2017-03/msg00113.html Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 8ddee0c..ea6adcb 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -1041,7 +1041,7 @@ _dll_crt0 ()
under our own control and avoids collision with the OS. */
if (!dynamically_loaded)
{
- if (!in_forkee || fork_info->from_main)
+ if (!in_forkee)
{
/* Must be static since it's referenced after the stack and frame
pointer registers have been changed. */