This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.7.9: static const std::string initialization lost in child process when using fork, dlopen


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]