delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/08/21/13:05:58

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o-
Date: Sun, 21 Aug 2011 13:05:32 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.9: static const std::string initialization lost in child process when using fork, dlopen
Message-ID: <20110821170532.GB19565@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1558100995 DOT 357508 DOT 1313927301638 DOT JavaMail DOT fmail AT mwmweb008>
MIME-Version: 1.0
In-Reply-To: <1558100995.357508.1313927301638.JavaMail.fmail@mwmweb008>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Sun, Aug 21, 2011 at 01:48:21PM +0200, whans AT web DOT de wrote:
>./test.exe prints only 'parent:Test' - parent works as expected - and gives a
>test.exe.stackdump - after 30 seconds.
>  
>  
>an example gdb session looks like:
>attach <child pid>
>b load
>c                (needs up to 30 seconds for return)
>n
>n
>n
>s                (step into dll's cTest::get method)
>p t             (print cTest::t, _M_p seems to be corrupt)
>$1 = {static npos = <optimized out>,
>   _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<
>No data fields>}, <No data fields>}, _M_p = 0x0}}
>n
>Program received signal SIGSEGV, Segmentation fault.
>0x6c4b95be in cygstdc++-6!_ZNSsC1ERKSs () from /usr/bin/cygstdc++-6.dll
>  
>  Any idea to fix or circumvent this error 

I don't get a coredump.  What I do get, after a 30 second wait, is:

child:Test

Maybe a snapshot will work better for you:  http://cygwin.com/snapshots/

--
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