aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2023-01-10 21:04:29 +0900
committerTakashi Yano <takashi.yano@nifty.ne.jp>2023-01-10 21:04:29 +0900
commita81fef51cf9f1b9fad73ad85826f02f40d85fda6 (patch)
tree7c98743e6a203f5f5223d606d1dab17b75b0d84d /winsup/cygwin/dcrt0.cc
parent7c14e5a10add3ad3dc53ed6af1ad2044d205e844 (diff)
downloadnewlib-a81fef51cf9f1b9fad73ad85826f02f40d85fda6.zip
newlib-a81fef51cf9f1b9fad73ad85826f02f40d85fda6.tar.gz
newlib-a81fef51cf9f1b9fad73ad85826f02f40d85fda6.tar.bz2
Cygwin: cygheap: Initialize myself_pinfo before child_copy().
After the commit 30add3e6b3e3, the problem: https://cygwin.com/pipermail/cygwin/2022-December/252759.html occurs rarely. It seems that myself_pinfo should be initialized where the timing before child_copy() and after cygheap allocation. This patch moves the initialization there. Fixes: 30add3e6b3e3 ("Cygwin: exec: don't access cygheap before it's initialized") Reported-by: Brian Inglis <Brian.Inglis@Shaw.ca> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 5c5a280..49b7a44 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -631,8 +631,6 @@ child_info_spawn::handle_spawn ()
if (!dynamically_loaded || get_parent_handle ())
{
cygheap_fixup_in_child (true);
- if (dynamically_loaded)
- moreinfo->myself_pinfo = NULL;
memory_init ();
}