X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- Date: Sun, 21 Aug 2011 12:50:01 -0400 From: Christopher Faylor 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: <20110821165001.GA19565@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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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: >Hello, >?? >it seems that a child process does not see the initialization of a >static const std::string variable if it is defined in a dll. Instead this corrupt variable >lead to a STATUS_ACCESS_VIOLATION. >?? >The following 4 example files demonstrate this behaviour: Am I the only person who sees lots of strange characters in the examples below where, presumably there is supposed to be whitespace? cgf >1) dllif.h: ?? ?? ??(define the dll's interface) >#include >class cTestIf { >public: >?? virtual std::string get() = 0; >}; >?? >?? ... -- 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