delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/04/03/15:12:56

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:message-id:date:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=jve
VsE64N+CsSTVOmOzhaICULFryVilNgA+EiTqqG3nbGMlMuG9hMKYVRD5CxwU90hx
ZpiMr6die94InQWVz8otM4uM660WhGjizXoW/6hasimbW5CNZulrpsDjnXhQluDZ
ZzUMDUhE/u6o9R1T6EkpuRglI3ZpRROk40fy/NZA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:message-id:date:mime-version
:content-type:content-transfer-encoding; s=default; bh=1f7LP1kYg
wo2rlva4IgNlQb2/IA=; b=MMtFCxZ3Wza33IhmHaezBelbsz6tn2KTjS4IR9ZzE
1fjMlyLY03wj581IhR8i4JHCMplz8HStmZEjxZ7e/1dQ4bwx9BCNcNktdM3OUL5N
LwnKKLx/208WrlqBgGAgRbdK0AhRN1Le6goNKvdsRsyoxKQKwwrvLmSnOQH6X5+X
v8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*UA:38.2.0, mysterious, H*u:38.2.0, Might
X-HELO: mout.kundenserver.de
To: cygwin AT cygwin DOT com
From: Thomas Wolff <towo AT towo DOT net>
Subject: crash caused by stack-allocated array in child process after fork?
Message-ID: <57016B18.6030906@towo.net>
Date: Sun, 3 Apr 2016 21:12:24 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
MIME-Version: 1.0
X-UI-Out-Filterresults: notjunk:1;V01:K0:USlxgDixWRA=:LaHyphV/4MOVJcX9CClJ85 szS3DguAAYYtXtjQq3jK1jMNFLmSp3nsGiQMiQptARqGzrtVWGNgkJeIo140avyMzAmOh8v6p EjzudziYdmr0gUHh7Sgdu1gpGQ37JFlEVaZXBFZae64L1GfQV4Vxq5WmO2HoXw/1lvRiU0PWE 720WpNBBQJL0FR/d5VFErg3khcZiywwq6W/pKLGF4Uts2UaDS+NhLkElvcNlrN91cJb7xcTEm k6skdJ7L5vmv6dc50NjlZQLmqspHlJgbjNNIPVV3SSB/Qn0wNAd3JDAHhsJAtfCukQMnBsz2O vw3ls0eeKW1qL77RQ8Xo/LJTtrXwPtFbvHXn4SFHSGS2KmJp9KTYH4O5bNG7MeNxvYb9UyIXL NLfS1pryiFLEt2xDP4kQGs+AEB/aJjVfziO5IQqmUkMCYX/5EroPCXiCgJqWqeuEJSnzaRe4x G72Vk5R6VK/kSLoGYcCFh1p02ohzr0K/S2n3nHf2iu3VBmQA7o+TozRwi7QXGh8Gsxu3dq/24 sjJButvsmDN1ptUMgakem9xrWvTnyBvRp6UhkXe6S3XcBewp9sK9qaQbMktqp5eBJWw4iFjw6 9Dn8EY4WImqlA19Azj9XCxPzWgs8ZbPuREWP8FfTIZkhrY94eaU4QANy+dCDpz9l/O+riNL1Z 6LTbIc/BzZPwAspvKJqYSHJ821k086QhEGb0t6ZALy8KhHVoV9ZSbPB9mQfQXDNxYM/DB3Tj8 blLppBMRddXc3k8m
X-IsSubscribed: yes

Mintty has been struck by a mysterious crash condition which seems to be 
related to a weird combination of circumstances, involving the creation 
of an array on the stack, like
   wchar msg[1024];
in a child process after a fork (as used for daemonizing).

Details are described in 
https://github.com/mintty/mintty/issues/530#issuecomment-205035847 -
note that the crash does not happen if the line quoted above is changed 
to any non-stack array creation, like
   wchar * msg = malloc...
   static wchar msg[1024]
   wchar msg[wlen]; // with int wlen = ..., in which case the array is 
created on the heap
or even, more mysteriously
   wchar msg[1800];

Has anyone experienced a similar issue? Could this be a gcc bug or 
cygwin bug? Might it be related to 
https://cygwin.com/ml/cygwin-developers/2016-03/msg00000.html ?

Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019