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

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Sun Aug 21 17:05:00 GMT 2011

On Sun, Aug 21, 2011 at 01:48:21PM +0200, whans@web.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)
>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}}
>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:


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

More information about the Cygwin mailing list