public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: 1.7.9: static const std::string initialization lost in child process when using fork, dlopen
Date: Sun, 21 Aug 2011 18:39:00 -0000	[thread overview]
Message-ID: <20110821183857.GC19565@ednor.casa.cgf.cx> (raw)
In-Reply-To: <4E513BF4.90308@hones.org.uk>

On Sun, Aug 21, 2011 at 06:10:12PM +0100, Cliff Hones wrote:
>On 21/08/2011 17:50, Christopher Faylor wrote:
>> On Sun, Aug 21, 2011 at 01:48:21PM +0200, whans@web.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?
>> 
>>> 1) dllif.h: ?? ?? ??(define the dll's interface)
>>> #include <string>
>>> class cTestIf {
>>> public:
>>> ?? virtual std::string get() = 0;
>>> };
>>> ??
>>> ??
>> 
>> ...
>
>Well, I'm afraid my mind-reading skills aren't good enough to answer
>that,

Sorry for the confusion.  I wasn't expecting people to psychically
determine if anyone else had problems.

While I appreciate the inclusion of a simple test case, it's always best
if the simple test case actually compiles.  Since C++ doesn't accept the
strange characters as whitespace, the test case did not compile.  I did,
obviously, work around the problem but its always best to put in as few
barriers as possible if you want help.  Inclusion of illegal characters
in a source program program is a barrier.

cgf

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

  reply	other threads:[~2011-08-21 18:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21 11:48 whans
2011-08-21 16:50 ` Christopher Faylor
2011-08-21 17:10   ` Cliff Hones
2011-08-21 18:39     ` Christopher Faylor [this message]
2011-08-21 21:15       ` Thomas D. Dean
2011-08-21 22:19         ` Christopher Faylor
2011-08-21 23:15           ` Thomas D. Dean
2011-08-21 23:56           ` Thomas D. Dean
2011-08-22  1:44             ` Christopher Faylor
2011-08-22  3:57               ` Thomas D. Dean
2011-08-22  5:11                 ` Christopher Faylor
2011-08-22  5:52                   ` Thomas D. Dean
2011-08-21 17:05 ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110821183857.GC19565@ednor.casa.cgf.cx \
    --to=cgf-use-the-mailinglist-please@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).