bug report: abort in g++ 3.4.4 generated DLL & client

Gerrit P. Haase gerrit@familiehaase.de
Tue Aug 2 19:42:00 GMT 2005


Dave Korn wrote:

> ----Original Message----
> 
>>From: Gerrit P. Haase
>>Sent: 02 August 2005 20:16
> 
> 
>>Gerrit P. Haase wrote:
>>
>>
>>>I get the same result when running a binary compiled with gcc-3.4.4 /
>>>binutils-20050608-2 / cygwin-1.5.17, here it is running fine, running
>>>the idebntical executable at another box with cygwin-1.5.18 gives me
>>>the crash.
>>
>>I should mention that it works also the other way round, the biary
>>compiled wit gcc-3.4.4 / binutils-20050610-1 / cygwin-1.5.18 is crashing
>>but when running it on another machine with cygwin-1.5.17 the identical
>>binary works ok.
>>
> 
> 
>   I think it's a problem in pthread/mutex stuff.  It's quite likely that it
> only shows with more recent gcc because of changes to libstdc++ between
> those two versions: I remember seeing quite a lot of work going on there to
> do with atomicity, locking and threadsafety.

I have not tried to build it with gcc-3.3.3, could someone with this
version handy build an executable and send it to me, please?


Source file 1: ==> testdll.cpp <==
    #include <string>
    std::string test() { return std::string(); }

Source file 2: ==> main.cpp <==
    #include <string>
    std::string test();

    int main() {
        puts("hello");
        test();
        puts("goodbye");
        return 0;
    }


Commands I used:

$ g++ -Wall -c testdll.cpp

$ g++ -Wall -c main.cpp

$ g++ -shared -o mydll.dll -Wl,--out-implib=libmydll.dll.a \
   -Wl,--export-all-symbols -Wl,--enable-auto-import \
   -Wl,--whole-archive dll.o  -Wl,--no-whole-archive
Creating library file: libmydll.dll.a

$ g++ -o mymain main.o mydll.dll


Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list